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.
- causes
-
SERVER-47700 renameCollection should check if the target collection exists before accessing the collection object
- Closed
- depends on
-
SERVER-46557 Commit quorum value can get lost when the node gets restarted or rolled back.
- Closed
-
SERVER-47517 Secondaries will always try to vote irrespective of the commit quorum (on/off) value.
- Closed
-
SERVER-47155 Limit the number of simultaneous index builds running from user connections to 3
- Closed
- is depended on by
-
SERVER-46658 Implement commit quorum option "all"
- Closed
-
SERVER-46823 Enable default for index commit quorum as "votingMembers"
- Closed
-
SERVER-47163 Do not start an index build if it doesn't exist when processing the 'commitIndexBuild' oplog entry
- Closed
- is related to
-
SERVER-60606 Race condition during initial sync when index builds start in data cloning phase
- Closed
-
SERVER-39423 secondaries already possessing an index replicated via startIndexBuild oplog entry should vote for commit immediately
- Closed
- related to
-
SERVER-47842 [4.4] listIndexes with includeBuildUUIDs=true in FCV 4.2 reports in-progress index build as completed
- Closed
-
SERVER-39453 Add initial sync support for simultaneous index builds
- Closed
-
SERVER-58280 initial sync hangs on hiding dropped index when index builds are active
- Closed