coll.stats() may fail with result.shards is not iterable

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 0.12.1
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • Iteration Athens, Iteration Barcelona
    • Not Needed

      See https://mongodb.slack.com/archives/CUKTSEB6J/p1611763429004100?thread_ts=1611762413.002900&cid=CUKTSEB6J – I would guess that this refers to https://github.com/mongodb-js/mongosh/blob/fb80fdea897dc48766c80058ddfae203f0e71f0b/packages/shell-api/src/collection.ts#L1395, result.shards can be a non-iterable even though result.sharded is true?

      https://docs.mongodb.com/manual/reference/command/collStats/ doesn’t mention either property, but they are present in sharded setups, so I’m not sure whether this is a server bug or purely a shell problem.

              Assignee:
              Anna Henningsen
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: