-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Storage Execution
The ShardingMigrationCriticalSection for each collection has no concurrency control itself. It depends upon the CollectionShardingRuntime to provide concurrency control. The two ShardingMigrationCriticalSection::entering* functions expect a collection X lock, the ShardingMigrationCriticalSection::exit* function expects a IX lock, and ShardingMigrationCriticalSection::get* presumably expects callers to hold a collection IS lock.
I do not understand how ShardingMigrationCriticalSection::get* and ShardingMigrationCriticalSection::exit* are concurrency safe, setting and accessing the same private class variable without a mutex to serialize such operations?
(note: this is going to remain on the execution backlog until the project design is finalized, then it will be passed to sharding to complete. this is to keep track of the work specifics)
- duplicates
-
SERVER-47563 Add concurrency control to the CollectionShardingState class such that it no longer depends upon collection locks for concurrency control
- Closed