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

Chunk Migration Destination Should Wait for Majority Before Engaging Critical Section

    • Cluster Scalability
    • Fully Compatible
    • ALL
    • v8.0, v7.3, v7.0, v6.0, v5.0
    • Cluster Scalability 2024-4-29
    • 2

      The recipient of a chunk migration will wait for replication after catching up enough to engage the critical section. The cloning of documents is done with local write concern, so although we will wait for majority when applying modifications via opReplicatedEnough, if there are no modifications we could end up entering the steady state with secondaries potentially far behind the primary. In this case, the critical section may time out when waiting for majority during the critical section.

      The current call to awaitReplication uses the _writeConcern member variable, which corresponds to the _secondaryThrottle write concern, which will be local write concern if _secondaryThrottle is false (which is the default). This means that the awaitReplication call is a no-op in the default case. Instead, we should use kMajorityWriteConcern for this wait as we were doing prior to SERVER-33417.

            Assignee:
            ben.gawel@mongodb.com Ben Gawel
            Reporter:
            brett.nawrocki@mongodb.com Brett Nawrocki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: