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

analyzeShardKey command should fail if only keyCharacteristics is requested and the shard key doesn't have a supporting index

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v7.0
    • Sharding NYC 2023-06-26

      If the analyzeShardKey command is run with keyCharacteristics: true and readWriteDistribution: false and the shard key does not have a supporting index, there is no metrics to return. The command would fail with an IllegalOperation error with the message like “Cannot analyze the characteristics of a shard key that doesn't have a supporting index” instead of returning an empty response. 

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

              Created:
              Updated:
              Resolved: