Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81370

Make all InitialSplitPolicy accept a set of available shards

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: