getShardDistribution should use $collStats agg stage instead of collStats command

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0
    • Sharding 2020-03-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      See https://gist.github.com/alexbevi/dc51c0ce4820f46e46feca06dbdc64bb for repro details.

      As getShardDistribution relies on the results of the collStats command, if the underlying command fails getShardDistribution can incorrectly report that the "Collection is not sharded". This command should use the $collStats agg stage to prevent the problem described in SERVER-44891.

              Assignee:
              Tommaso Tocci
              Reporter:
              Alex Bevilacqua
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: