안쓰는 인덱스 제거
This commit is contained in:
@ -318,18 +318,6 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeIndices(CollectionWhitelist, map[string]bson.D{
|
||||
"service": {{Key: "service", Value: 1}},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeIndices(CollectionFile, map[string]bson.D{
|
||||
"service": {{Key: "service", Value: 1}},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeIndices(CollectionAccount, map[string]bson.D{
|
||||
"accid": {{Key: "accid", Value: 1}},
|
||||
}); err != nil {
|
||||
@ -337,11 +325,12 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeUniqueIndices(CollectionFile, map[string]bson.D{
|
||||
"sk": {{Key: "service", Value: 1}, {Key: "key", Value: 1}},
|
||||
"keyonly": {{Key: "key", Value: 1}},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete대신 _ts로 expire시킴. pipeline에 삭제 알려주기 위함
|
||||
if err = mg.mongoClient.MakeExpireIndex(CollectionWhitelist, 10); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user