Do not use sparse or partial index to calculate cardinality and frequency of a shard key

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding 2022-10-03, Sharding 2022-10-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using a sparse or partial index can cause the aggregation command to return the wrong cardinality and frequency since:

      • Sparse indexes omit documents that have null/missing index key fields.
      • Partial indexes omit documents that do not match the specified filter.

      A shard key index can never be sparse or partial so this requirement only affects the candidate key case.

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

              Created:
              Updated:
              Resolved: