[SERVER-43612] secondary fails to start index build due to in-progress aborted index build with duplicate name Created: 24/Sep/19  Updated: 29/Oct/23  Resolved: 04/Oct/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-43692 enable two phase index builds by default Closed
Related
related to SERVER-43826 Coverity analysis defect 113598: PW.P... Closed
is related to SERVER-39239 Two-phase index builds on secondaries... Closed
is related to SERVER-41870 Implement IndexBuildsCoordinator::abo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-10-07
Participants:
Linked BF Score: 15

 Description   

A primary node that steps down with an ongoing index build may affect new index builds containing the same index names as a secondary.

If the interrupted index build started when the node was a primary is slow to complete its teardown, it may conflict with new index builds triggered by the createIndexes oplog entry due to the IndexBuildAlreadyInProgress check in the IndexBuildsCoordinator. This error is considered non-fatal during oplog application and would result in the secondary node silently ignore the index creation request.

This issue affects index builds started on a primary that is using the IndexBuildsCoordinator so we should not see this same failure under 4.2.

Also, this issue should go away with two phase index builds but may still be observer under FCV 4.2 when we trigger index builds on the createIndexes oplog entry.



 Comments   
Comment by Githook User [ 03/Oct/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-43612 abort oplog application if new createIndexes oplog entry conflicts with interrupted index build
Branch: master
https://github.com/mongodb/mongo/commit/532c0a9b072d01bfc740768592ed6c352459bc85

Comment by Githook User [ 03/Oct/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-43612 add js test for duplicate index builds across stepdowns
Branch: master
https://github.com/mongodb/mongo/commit/6c1c9faf715da581706caa75241ae50d7d8befe8

Comment by Githook User [ 02/Oct/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-43612 log index build conflict details
Branch: master
https://github.com/mongodb/mongo/commit/ea7ce23c8982bad2822d847a47fb95198dbc50eb

Comment by Githook User [ 02/Oct/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-43612 IndexBuildTest.assertIndexes() returns map of index specs on success
Branch: master
https://github.com/mongodb/mongo/commit/39759fe911e62d278d9eba09a068e006c77bbea8

Comment by Benety Goh [ 24/Sep/19 ]

The index build abort behavior was added in SERVER-41870 with JS tests to simulate step downs during index builds.

The IndexBuildsCoordinator should be able to identify interrupted index builds that are in the midst of aborting due to additional information added in SERVER-39239.

Generated at Thu Feb 08 05:03:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.