Skip to content

Commit a6fe336

Browse files
authored
Update sharding.js (#7237)
1 parent bf37887 commit a6fe336

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bin/scripts/sharding/sharding.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ check.forEach(function(c) {
5858
var exceptional = true;
5959
var db = clyCollections.indexOf(c) === -1 ? drill : cly,
6060
dbName = clyCollections.indexOf(c) === -1 ? COUNTLY_DRILL : COUNTLY,
61-
count = db[c].count(),
62-
capped = db[c].stats()['capped'];
63-
61+
//count = db[c].count(), -- This is deprecated in mongo version >6
62+
count = db[c].countDocuments({});
63+
var capped = db[c].stats()['capped'];
6464
COUNTLY_TO_SHARD.some((e) => {
6565
if (c.indexOf(e) == 0) {
6666
exceptional = false;

0 commit comments

Comments
 (0)