From 5cec6d57d737e7f1296c1ba012e5047ef91703d1 Mon Sep 17 00:00:00 2001 From: Logan Lembke Date: Tue, 17 Jan 2023 09:44:45 -0700 Subject: [PATCH] Ensure that the dbStats item always comes before the scale item using bson.D instead of bson.M (#780) Co-authored-by: Logan L --- commands/clean.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/clean.go b/commands/clean.go index ec61d2ec..c9699243 100644 --- a/commands/clean.go +++ b/commands/clean.go @@ -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 {