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

getShardDistribution should use $collStats agg stage instead of collStats command

    XMLWordPrintableJSON

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: