-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.3
-
Component/s: Sharding
-
None
-
Sharding
-
Sharding 2019-02-11
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
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L151 (used for MODE_IS collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L450 (used for MODE_IX collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L486 (used for MODE_IX collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L559 (used for MODE_IS collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L626 (used for MODE_IS collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L669 (used for MODE_IX oplog collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/migration_source_manager.cpp#L685 (used for MODE_IX collection lock and MODE_X CSRLock)
MovePrimarySourceManager
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/move_primary_source_manager.cpp#L255 (used for MODE_IX db lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/move_primary_source_manager.cpp#L359 (used for MODE_IX db lock)
CollectionRangeDeleter
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/collection_range_deleter.cpp#L135 (used for MODE_IX collection lock)
- https://github.com/mongodb/mongo/blob/42999ae47bacedf260be2d6dd5e377ff0ae63744/src/mongo/db/s/collection_range_deleter.cpp#L255 (used for MODE_IX collection lock)
- depends on
-
SERVER-38440 Remove unnecessary UninterruptibleLockGuards from sharding code
- Closed
-
SERVER-38474 Make ReplSetDistLockManager::shutDown interruptible
- Closed
- is related to
-
SERVER-38473 Replace uses of UninterruptibleLockGuard and MODE_X collection locks with uses of a database sharding state mutex for movePrimary functions
- Closed
-
SERVER-38828 Replace uses of UninterruptibleLockGuard and MODE_X collection locks with uses of the CSRLock and MODE_IX collection locks where necessary.
- Closed