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

RangeDeleter unnecessarily waits for 'majority' write concern

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.14, 3.4.4
    • Fix Version/s: 3.4.14
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2018-02-26, Sharding 2018-03-12

      Description

      The range deleter waits for replication on two occasions:

      1. First using the moveChunk operation's write concern in Helpers::removeRange which does log the time spent for replication.
      2. Second time using a 'majority' write concern, which does not log at all.

      This second majority wait is completely unnecessary. The migration recipient side can keep going without attempting a majority write until the very end, after all documents have been transferred.

      As part of fixing this bug, we should consider the following:

      • Before even accepting a migration request, the recipient shard should do a best-effort attempt to check how behind it is from the rest of the replica set (perhaps by doing a majority write with some timeout then) and if that fails, don't even attempt a migration. This is the counterpart of SERVER-22876.
      • If the migration was for an empty chunk and we didn't patch up any indexes, do not do any replication waits at all and enter the READY state immediately.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: