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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.0-rc4, 4.7.0
    • Storage
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-03-23, Execution Team 2020-04-06, Execution Team 2020-04-20, Execution Team 2020-05-04
    • 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

              gregory.wlodarek@mongodb.com Gregory Wlodarek
              suganthi.mani@mongodb.com Suganthi Mani
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: