-
Type:
Bug
-
Status: Open
-
Priority:
Major - P3
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 4.3 Required
-
Component/s: Shell
-
Labels:
-
Operating System:ALL
-
Sprint:Sharding 2019-10-21, Sharding 2019-11-04, Sharding 2019-11-18
-
Case:
If collStats exceeds the maxBSONSize of 16MB due to a lot of shard metadata, getShardDistribution() erroneously reports that the collection is not sharded. This is caused by the function not checking for an error in the collStats command:
> db.COLL.getShardDistribution
|
function () {
|
|
var stats = this.stats();
|
|
if (!stats.sharded) {
|
print("Collection " + this + " is not sharded.");
|
return;
|
}
|
|
... logic to print shard stats ...
|
The stats.sharded property doesn't exist if stats contains an error message, which is why getShardDistribution() reports a collection as unsharded if its shard metadata causes the collStats command to fail.
- is duplicated by
-
SERVER-44892 getShardDistribution will fail if collStats command fails
-
- Closed
-
- is related to
-
SERVER-32198 Missing collection metadata on the shard implies both UNSHARDED and "metadata not loaded yet"
-
- Open
-
- related to
-
SERVER-43689 getShardDistribution() incorrectly shows 0 chunks
-
- Closed
-
-
SERVER-44891 collStats will fail if resulting BSON size > 16MB
-
- Investigating
-