[SERVER-69867] Do not use sparse or partial index to calculate cardinality and frequency of a shard key Created: 21/Sep/22  Updated: 29/Oct/23  Resolved: 04/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2022-10-03, Sharding 2022-10-17
Participants:

 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.



 Comments   
Comment by Githook User [ 04/Oct/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-69867 Do not use sparse or partial index to calculate cardinality and frequency of a shard key
Branch: master
https://github.com/mongodb/mongo/commit/5d1284a62a9d371ddab43216d396a4c392625eff

Generated at Thu Feb 08 06:14:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.