summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorAlex Taskov <alex.taskov@mongodb.com>2019-10-22 01:26:01 +0000
committerevergreen <evergreen@mongodb.com>2019-10-22 01:26:01 +0000
commit563dc7451690efa475db5feda913098e777471da (patch)
treed2aff492e3e35eac18df3d0dd3f684a49f5be463 /src/mongo
parentdb9291bfafb17427adb031ba0326d1acfc52bde0 (diff)
downloadmongo-563dc7451690efa475db5feda913098e777471da.tar.gz
SERVER-43689 getShardDistribution() incorrectly shows 0 chunks
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/shell/collection.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/collection.js b/src/mongo/shell/collection.js
index a6a81cf66a6..50bf9ac9008 100644
--- a/src/mongo/shell/collection.js
+++ b/src/mongo/shell/collection.js
@@ -1120,7 +1120,7 @@ DBCollection.prototype.getShardDistribution = function() {
var shardStats = stats.shards[shard];
- var chunks = config.chunks.find({_id: sh._collRE(this), shard: shard}).toArray();
+ var chunks = config.chunks.find({ns: stats.ns, shard: shard}).toArray();
numChunks += chunks.length;