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

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Sharding 2022-10-03, Sharding 2022-10-17

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: