[SERVER-39427] Modify interrupt semantics for opCtx Created: 07/Feb/19  Updated: 29/Oct/23  Resolved: 05/Mar/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.1.9

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

Issue Links:
Depends
Duplicate
is duplicated by SERVER-39643 Replace UninterruptibleLockGuard with... Closed
Related
related to SERVER-39208 ignore InterruptedAtShutdown in ARS dtor Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2019-03-11
Participants:
Linked BF Score: 28

 Description   

Currently, runWithoutInterruption still allows interruption at global shutdown, which is a required semantic for some current callers (index builds)

Separately, we need access to true uninterruptibility,

  • rename opCtx->runWithoutInterruption to runWithoutInterruptionExceptAtGlobalShutdown
  • add a opCtx->setIsExecutingShutdown method which makes the op immune to all forms of interruption, including global shutdown

This clarifies what opCtx->runWithoutInterruption actually did and offers an escape hatch that turns off interruption at process exit for the thread doing cleanup.

This also sets the isExecutingShutdown flag on the ops called from the shutdown task to prevent those ops from getting killed / killing themselves



 Comments   
Comment by Githook User [ 05/Mar/19 ]

Author:

{'name': 'Jason Carey', 'email': 'jcarey@argv.me', 'username': 'hanumantmk'}

Message: SERVER-39427 Modify interrupt semantics for opCtx

  • rename opCtx->runWithoutInterruption to
    runWithoutInterruptionExceptAtGlobalShutdown
  • add a opCtx->setIsExecutingShutdown method which makes the op immune
    to all forms of interruption, including global shutdown

This clarifies what opCtx->runWithoutInterruption actually did and
offers an escape hatch that turns off interruption at process exit for
the thread doing cleanup.
Branch: master
https://github.com/mongodb/mongo/commit/32a067938731d184b271ba3d7f43ca6727e3109c

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