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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: