analyzeShardKey doesn't detect collection UUID changes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • ALL
    • Hide

      Apply the given repro patch on commit r8.3.0-alpha0-1080-g7cc7fc5df4d and execute jstests/sharding/analyze_shard_key/analyze_shard_key_cmd_validation.js in the sharding suite.

      Show
      Apply the given repro patch on commit r8.3.0-alpha0-1080-g7cc7fc5df4d and execute jstests/sharding/analyze_shard_key/analyze_shard_key_cmd_validation.js in the sharding suite.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If the collection UUID changes because the collection have been dropped and recreated during the execution of the analyzeShardKey command, the command could return wrongly the following error message:

      errorCode: 7826501,
      message: "The number of documents returned by $collStats indicates that the collection is empty. This is likely caused by an unclean shutdown that resulted in an inaccurate fast count or by deletions that have occurred since the command started."
      

      The analyzeShardKey is actually passing down the collectionUUID to the aggregation pipeline execution here, but this is being ignored.

      Instead, we should set the collection UUID on the aggRequest object.

        1. proposed_fix.patch
          0.6 kB
        2. analyzeshardkey_uuid_repro.js
          1.0 kB

            Assignee:
            Cheahuychou Mao
            Reporter:
            Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: