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

Retrying initial shardCollection with hashed shard key after retryable error can skip moveChunk

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • ALL
    • 26

      The last step in _configsvrShardCollection is to migrate initial chunks from empty collections to spread them across the shards, which is only done if the collection is empty and the shard key is hashed. If there is a retryable error (like a stepdown) after the step before, which is to actually shard the collection through the ShardingCatalogManager, then when the command is retried, it will early exit successfully because the collection is already sharded with the same options, which skips the moveChunk call.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: