[SERVER-33577] Remove UninterruptibleLockGuards in sharding code to allow interruptible lock acquisition Created: 01/Mar/18  Updated: 27/Oct/23  Resolved: 15/Mar/19

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-38440 Remove unnecessary UninterruptibleLoc... Closed
depends on SERVER-38474 Make ReplSetDistLockManager::shutDown... Closed
Related
is related to SERVER-38473 Replace uses of UninterruptibleLockGu... Closed
is related to SERVER-38828 Replace uses of UninterruptibleLockGu... Closed
Assigned Teams:
Sharding
Sprint: Sharding 2019-02-11
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 sharding code have temporary UninterruptibleLockGuard s to prevent crashing due to inadequate exception handling:

MigrationSourceManager

MovePrimarySourceManager

CollectionRangeDeleter

 

 

 



 Comments   
Comment by Kaloian Manassiev [ 15/Mar/19 ]

As part of the dependent tickets we have removed the UninterruptibleLockGuard(s) necessary for the replication stepdown project. The remaining places, which Blake has linked are about cleaning up the internal sharding data structures and removing them without some redesign is difficult. Given that the prepare project is unblocked now, I am going to close this ticket as Works as Designed.

Comment by Blake Oler [ 21/Feb/19 ]

We have removed some of these since. We have gone from 16 uses to 11 – in that process, we removed all uses from the MigrationDestinationManager and ReplsetDistLockManager. I linked some relevant tickets.

CC greg.mckeon

Comment by Kaloian Manassiev [ 02/Mar/18 ]

The migration source manager is not 100% exception-safe, especially during the migration critical section. It would require some redesign to be able to remove the UninterruptibleLockGuards, so I am putting this on 3.7 Desired, to be done if time permits.

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