Currently, shard keys with a hashed field are handled as follows. If the number of fields is 1, then the analyzeShardKey command would just return "not monotonic". If the number of fields is > 1, the command would instead try to infer its monotonicity from the correlation coefficient of the recordIds. The latter is incorrect since hashing introduces randomness so it is meaningless to calculate the correlation coefficient of recordIds in a hashed index. According to BF-28591, this is causing a monotonic shard key to be reported as "not monotonic" and vice versa.
analyzeShardKey command can return incorrect monotonicity for compound hashed shard keys
- Votes:
-
0 Vote for this issue
- Watchers:
-
3 Start watching this issue
- Created:
- Updated:
- Resolved: