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

getShardDistribution should use $collStats agg stage instead of collStats command

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2, v4.0
    • Sprint:
      Sharding 2020-03-23
    • Case:

      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

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

                Dates

                Created:
                Updated:
                Resolved: