[SERVER-74773] Make analyzeShardKey command use the most compatible index to calculate cardinality and frequency metrics Created: 13/Mar/23 Updated: 29/Oct/23 Resolved: 14/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | 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 |
| Operating System: | ALL |
| Sprint: | Sharding NYC 2023-03-20 |
| Participants: |
| Description |
|
The analyzeShardKey command currently simply uses the first prefixed index that it sees when it goes through the indexes in the IndexCatalog. However, consider the case the shard key being analyzed is {x: 1} and the collection has two indexes {x: 1, y: 1} which is a not unique index and |
| Comments |
| Comment by Githook User [ 14/Mar/23 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: |