Skip to content

Commit

Permalink
Revise change collection index
Browse files Browse the repository at this point in the history
  • Loading branch information
raararaara committed Nov 8, 2024
1 parent e56e9f8 commit 0a770cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/backend/database/mongo/indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ var collectionInfos = []collectionInfo{
}, {
name: ColChanges,
indexes: []mongo.IndexModel{{
Keys: bsonx.Doc{
{Key: "doc_id", Value: bsonx.Int32(1)}, // shard key
{Key: "project_id", Value: bsonx.Int32(1)},
{Key: "server_seq", Value: bsonx.Int32(1)},
},
Options: options.Index().SetUnique(true),
}, {
Keys: bsonx.Doc{
{Key: "doc_id", Value: bsonx.Int32(1)}, // shard key
{Key: "project_id", Value: bsonx.Int32(1)},
Expand Down

0 comments on commit 0a770cd

Please sign in to comment.