Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44892

getShardDistribution should use $collStats agg stage instead of collStats command

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

      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.

        1. screenshot-1.png
          51 kB
          Alex Bevilacqua

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: