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

RangeDeleter unnecessarily waits for 'majority' write concern

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.14
    • Affects Version/s: 3.2.14, 3.4.4
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2018-02-26, Sharding 2018-03-12

      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.

            Assignee:
            kevin.pulo@mongodb.com Kevin Pulo
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: