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: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.3
    • Affects Version/s: None
    • Component/s: sh
    • None
    • Developer Tools
    • 3
    • Not Needed
    • Iteration Milky Way

      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:
            gagik.amaryan@mongodb.com Gagik Amaryan
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: