-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Catalog and Routing
-
ALL
-
Sharding EMEA 2023-01-23, Sharding EMEA 2023-02-20, Sharding EMEA 2023-03-06, Sharding EMEA 2023-05-01, Sharding EMEA 2023-05-15
-
3
Both extractKeyPattern and inferKeyPattern wrongly assume that no field in a shard key can be hashed.
Given a document, they simply generate a key pattern by setting at 1 all the values of the fields.
Examples:
Real shard key pattern | Document | Inferred/extracted key pattern | |
{x:1, y:1} | {x: 12345, y: 67890} | {x:1, y:1} | Correct |
{x:hashed, y:1} | {x: 12345, y: 67890} | {x:1, y:1} | Wrong |