-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
3
The ShardingDDLComponent infrastructure includes a state document to keep track of the progress of its execution; this object may be accessed by multiple threads, such as:
- the executor running the coordinator itself (r/w)
- $currentOps requests (r)
The DDL infrastructure also defines a mutex to protect the access to the doc, but it is still the responsibility of each implementation to enforce the right semantics.
The DDL infrastructure could instead provide a set of higher level primitives for accessing the recovery document object that implements the following semantics:
- the DDL executor thread is the only one allowed to write onto the recovery document
- no reads are allowed while a write is in progress