-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Cluster Scalability
-
ALL
Currently, when running resharding with zones, it uses the sampling based policy to determine the chunks and the distribution of the new created collection, however, there are two problems with this path:
First, when creating the first split points, the range is being extended, this ends up generating a split point when it shouldn't, like for example, if the shard key is being extended from {a: 1} to {a: 1, b: 1} ends up generating two chunks: {min: {a: MinKey(), b: MinKey}, max: {a: MaxKey(), b: MinKey()}} and {min: {a: MaxKey(), b: MinKey}, max: {a: MaxKey(), b: MaxKey()}}.
Additionally, when initializing the policy, the zone's shards are not being passed, this is wrong because the code ends up assigning the chunks to non draining shards, which could generate a zone violation.
You can find a reproducible attached.
- is related to
-
SERVER-93839 Ensure zone ranges modifications contains the complete shard key to prevent surprises
- Backlog