-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Sharding EMEA
-
Fully Compatible
-
Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30
The InitialSplitPolicy class is used to generate a list of initial chunks to be created during a shardCollection operation. The chunk distribution is based on the split policy, i.e., based on the input parameters and the collection state. When distributing the chunks to the shards, the shards are randomly shuffled, so two calls to 'createFirstChunks' may not result in the same chunk distribution.
The goal of this ticket is to add a set of shards as a parameter in such a way that, if we call 'createFirstChunks' for each split policy involved in the createCollection, we always return a chunk distribution that respects the given shards. With that, we guarantee that we will return a chunk distribution that distributes at least one chunk per given shard, and no new shards will be involved in the chunk distribution.
It is not a goal of this ticket to always return the same chunk distribution.
We have an example of this work at SamplingBasedSplitPolicy, a split point building strategy for resharding.
- is depended on by
-
SERVER-78918 Make `shardCollection` command shard authoritative
- Closed