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:33:35 +0000
commit3abfe3f8aed2b6e15ecb7c80bc77db0449d5bea5 (patch)
treebfb30a3f59d232a005df95f66cf2956fdbafa1e8
parent86bdb6bff436ed7b9d4814ce3defd39f033bd580 (diff)
downloadmongo-3abfe3f8aed2b6e15ecb7c80bc77db0449d5bea5.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 274eeaafb6d..4ff9cc8a014 100644
--- a/src/mongo/shell/collection.js
+++ b/src/mongo/shell/collection.js
@@ -1113,7 +1113,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});
};
/**