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

Optimize resharding when primary shard owns zero chunks for resharded collection

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Cluster Scalability
    • Cluster Scalability Priorities

      The primary shard is always added as a recipient shard in a resharding operation. This is because commands like listCollections always target the primary shard even when the shard owns zero chunks for the sharded collection.

      The idea would be to have the primary shard skip cloning any collection data, any config.transactions entries, and any oplog entries. To put it another, the primary shard when it owns zero chunks would create the temporary resharding collection and then transition into kStrictConsistency. Some evaluation must still be done to ensure the resharding coordinator is capable of handling a recipient shard being in the kStrictConsistency state prior to all of the donor shards.

      This would have the ancillary benefit of addressing how approxDocumentsToCopy and approxBytesToCopy as non-zero values on the primary shard when it owns zero chunks.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: