[SERVER-39643] Replace UninterruptibleLockGuard with runWithoutInterruption() in shutdown Created: 15/Feb/19  Updated: 08/Jan/24  Resolved: 05/Mar/19

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

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-39949 Replace uses of UninterruptibleLockGu... Closed
Duplicate
duplicates SERVER-39427 Modify interrupt semantics for opCtx Closed
Operating System: ALL
Sprint: Repl 2019-03-11
Participants:
Linked BF Score: 28

 Description   

UninterruptibleLockGuard only suppresses the interruptions in lock acquisition. We should use opCtx->runWithoutInterruption() instead in case checkForInterrupt() is called elsewhere. opCtx->waitForConditionOrInterrupt() in checkOutSessionForKill is an example.



 Comments   
Comment by Siyuan Zhou [ 05/Mar/19 ]

Thanks mira.carey@mongodb.com, I believe your ticket has covered this case too. Thanks for the quick fix!

Comment by Mira Carey [ 05/Mar/19 ]

I've closed SERVER-39427, which provides a new setIsExecutingShutdown() method on opCtx, which renders it entirely unkillable. For now I'm setting that on the opCtx which wins the shutdown race (and is executing cleanup tasks) in mongod and mongos.

Not sure if there is other work you'd like to do in this space, or if that takes care of the use cases you're concerned with (I do believe it cleans up BF-12099)

Comment by Judah Schvimer [ 04/Mar/19 ]

I've filed SERVER-39949 for the TransactionParticipant work.

Comment by Siyuan Zhou [ 19/Feb/19 ]

judah.schvimer, this doesn't extend to uses in TransactionParticipant. There's an active discussion in the CR about whether this will fix the problem or not. Initially the work for TransactionParticipant is added to SERVER-39438. Since that ticket has been reprioritized, we may want a new ticket to track the work separately once we reach an conclusion in the CR.

Comment by Judah Schvimer [ 19/Feb/19 ]

siyuan.zhou, does this ticket extend to uses in TransactionParticipant or should we file a separate ticket for that?

Generated at Thu Feb 08 04:52:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.