[SERVER-77918] Make monotonicity calculation in analyzeShardKey command avoid unnecessary shard key extraction and comparison Created: 08/Jun/23 Updated: 29/Oct/23 Resolved: 14/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc5 |
| 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 | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v7.0
|
||||
| Sprint: | Sharding NYC 2023-06-12, Sharding NYC 2023-06-26 | ||||
| Participants: | |||||
| Description |
|
The check involves scanning the supporting index to get the recordIds and checking that shard key isn't constant. The latter can be done without extracting the shard key value from every index key value and compare every pair of pervious and current value, i.e. we can skip extracting and comparing as long as more than one shard key value has been seen. The check was only necessary back when we use to exclude recordIds with the same shard key value from the correlation coefficient calculation in |
| Comments |
| Comment by Githook User [ 16/Jun/23 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: (cherry picked from commit cf00278a5230148eaf71c04df84f6c6de77decee) |
| Comment by Githook User [ 14/Jun/23 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: |