Skip to content

Commit

Permalink
Ensure that the dbStats item always comes before the scale item using…
Browse files Browse the repository at this point in the history
… bson.D instead of bson.M (#780)

Co-authored-by: Logan L <logan@bhis.co>
  • Loading branch information
Zalgo2462 and Logan L committed Jan 17, 2023
1 parent b96ae47 commit 5cec6d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/clean.go
Expand Up @@ -102,9 +102,9 @@ func cleanDatabase(c *cli.Context) error {
IndexSize int64 `bson:"indexSize"`
}

err = session.DB(matchingDB).Run(bson.M{
"dbStats": 1,
"scale": 1024 * 1024,
err = session.DB(matchingDB).Run(bson.D{
{Name: "dbStats", Value: 1},
{Name: "scale", Value: 1024 * 1024},
}, &dbSize)

if err != nil {
Expand Down

0 comments on commit 5cec6d5

Please sign in to comment.