[SERVER-46816] Race between oplog applier thread and index build coordinator thread leads to an invariant failure. Created: 12/Mar/20  Updated: 09/Apr/20  Resolved: 09/Apr/20

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

Type: Bug Priority: Major - P3
Reporter: Suganthi Mani Assignee: Louis Williams
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
duplicates SERVER-46560 Make Abort index build logic determin... Closed
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-04-06, Execution Team 2020-04-20
Participants:

 Description   

A race can happen between oplog applier thread and index build coordinator thread and leading to this invariant failure. Oplog applier on receiving abortIndexBuild oplog entry performs the below steps.

1) Oplog applier thread signals abort to index builder.
2) Then calls the IndexBuildsCoordinator::_getIndexBuild() to get the ReplIndexBuildState for that index build.
3) Then waits for the index build to complete by waiting on the ReplIndexBuildState:: sharedPromise

Between step 1 and step 2, the index builder might have aborted and torn down the index build. In such cases, the step 2 would return "NoSuchKey" error.



 Comments   
Comment by Louis Williams [ 09/Apr/20 ]

This very specific race condition is eliminated by SERVER-46560.

Comment by Louis Williams [ 19/Mar/20 ]

This problem will likely be addressed by SERVER-46560

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