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

Make sure analyzeShardKey command uses database and shard versioning when running commands for calculating metrics

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding NYC 2023-03-20

      SERVER-74416 made mongos explicitly attach a readConcern to the analyzeShardKey command that it forwards to a shard. That only makes the analyzeShardKey performs the database and shard versioning check before it starts executing. Data placement changes can occur after the command starts executing. So all the aggregate commands (**) that the analyzeShardKey command run internally must also explicitly attach a readConcern to opt into database and shard versioning.

      (**) The aggregate command for calculating the cardinality and frequency metrics for a non-unique shard key can continue to use readConcern "available" due to the performance reasons related to shard filtering as detailed in the design. 

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: