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

Resharding might generate a zone violation

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: