Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1838

Account for orphan documents count in getShardDistribution() helper

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: sh
    • None
    • Developer Tools
    • 3

      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)

            Assignee:
            Unassigned Unassigned
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: