summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-04-09 15:36:14 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-11 05:37:34 +0000
commit930dff22da4d089866502ca0337dbe356ec96b3e (patch)
tree391c5da314d051883628d195a1ee68d40cd43e83
parent3db1ed43be83ba5d407edfc9d8c8dc5a7f168ffc (diff)
downloadmongo-930dff22da4d089866502ca0337dbe356ec96b3e.tar.gz
SERVER-44051 ensure getShardDistribution correctly checks for sharded collections
(cherry picked from commit f32f2f906f8c37145ed2bf64cd8db99d35671a41)
-rw-r--r--src/mongo/shell/collection.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/collection.js b/src/mongo/shell/collection.js
index 4b552d4da3f..06a14a7111a 100644
--- a/src/mongo/shell/collection.js
+++ b/src/mongo/shell/collection.js
@@ -1178,7 +1178,8 @@ DBCollection.autocomplete = function(obj) {
* @return {boolean}
*/
DBCollection.prototype._isSharded = function() {
- return !!this._db.getSiblingDB("config").collections.countDocuments({_id: this._fullName});
+ return !!this._db.getSiblingDB("config").collections.countDocuments(
+ {_id: this._fullName, dropped: false});
};
/**