[SERVER-33576] Remove UninterruptibleLockGuards in replication code to allow interruptible lock acquisition Created: 01/Mar/18  Updated: 29/Oct/23  Resolved: 14/Mar/18

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams 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: Repl 2018-03-26
Participants:

 Description   

Since SERVER-32638, global and database locks can be interrupted when an OperationContext is killed and throw a DBException with an Interrupted error code. This includes all AutoGet helpers.

The following places in the replication code have temporary UninterruptibleLockGuard s to prevent crashing due to inadequate exception handling:

src/mongo/db/repl/master_slave.cpp:886
src/mongo/db/repl/master_slave.cpp:1307
src/mongo/db/repl/replication_coordinator_impl.cpp:1588



 Comments   
Comment by Spencer Brody (Inactive) [ 14/Mar/18 ]

The master-slave code has been removed, and the UninterruptableLockGuard in replication coordinator is used in stepdown, where it is something we'll want to keep around indefinitely. I did, however, reduce the scope of the guard for just the one part of stepDown that needs it.

Comment by Githook User [ 14/Mar/18 ]

Author:

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

Message: SERVER-33576 Reduce scope of UninterruptibleLockGuard in ReplicationCoordinator
Branch: master
https://github.com/mongodb/mongo/commit/cdb8f2f7ad472416c579c6c13292d3fb361d94cb

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