Starting from 6.0 SERVER-62554 we exposed orphan documents statistics in $collStats . On the other hand we never updated getShardDistribution() helper to take advantage of those new stats. And in fact recently we got one help ticket (HELP-61175) where TS and customer thought chunks on first shard were bigger than second shard, just because getShardDistribution() was not correctly accounting for orphans documents.
The goal of this ticket is to change getShardDistribution() to correctly account orphan documents counts when calculating statistics. This count is present under the "numOrphanDocs" field in $collStats output in version (>= 6.0)
- is related to
-
SERVER-62554 Add orphans info in `collStats` aggregation stage output
- Closed