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

Make initial sync work with two phase index builds + commit quorum on

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.0-rc4, 4.7.0
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-03-23, Execution Team 2020-04-06, Execution Team 2020-04-20, Execution Team 2020-05-04
    • Linked BF Score:
      50

      Description

      Currently initial sync ignores any in-progress 2 phase index builds. Only if it sees commitIndexBuild oplog entry during the initial sync oplog replay or during secondary oplog application, the index build gets started and committed. Now, the problem is that, for two phase index builds with commit quorum on, the primary can commit the index build only if my number of ready to commit votes satisfy commit quorum value.

      Let's assume my commit quorum is "all" and its a 2 node replica set. To be noted, In our today's world, initial syncing nodes can vote, as a result. so consider the below scenario.
      1) Node A is primary
      2) Node B starts performing initial sync.
      3) Primary(node A) starts the index build 'x_1' for collection foo.bar and votes for itself.
      4) Node B ignores building/in-progress 'x_1' during initial sync.
      5) Node B finishes initial sync.
      6) Since Index build 'x_1' has received only one vote < ("all" = 2), so it can't commit the index build and keeps waiting for the votes from secondary(Node B) forever.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregory.wlodarek Gregory Wlodarek
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: