[SERVER-51095] Keep track of OpCtxs created by PrimaryOnlyService threads and interrupt them at stepdown Created: 22/Sep/20  Updated: 29/Oct/23  Resolved: 25/Sep/20

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

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service arch 2020-10-05
Participants:

 Description   

Currently there is a small race condition where PrimaryOnlyService opCtxs can miss getting interrupted during stepdown. This can happen if a PrimaryOnlyService thread creates a new opCtx after the stepdown thread has already killed all OpCtxs as part of acquiring the RSTL lock, but before PrimaryOnlyService::onStepdown has been called.

Explicitly interrupting all OpCtxs owned by PrimaryOnlyServices in PrimaryOnlyService::onStepdown closes that window.



 Comments   
Comment by Githook User [ 25/Sep/20 ]

Author:

{'name': 'Spencer T Brody', 'email': 'spencer@mongodb.com', 'username': 'stbrody'}

Message: SERVER-51095 Track OpCtxs used by PrimaryOnlyServices and interrupt them at stepdown
Branch: master
https://github.com/mongodb/mongo/commit/53cd04399c0f475034bb9e9098dafc920a08e0af

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