-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.0.0, 5.2.0, 5.1.0
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v6.0, v5.0
-
Sharding EMEA 2022-02-07, Sharding EMEA 2022-02-21, Sharding EMEA 2022-04-18, Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16
-
15
Instances of ShardingDDLCoordinators maintain an in-memory copy of their state document (e.g). The coordinator's main thread reads and writes it (e.g.). Also, other threads also read it without proper syncronization (e.g. checkIfOptionsConflict, reportForCurrentOp). This can lead to data races. This same pattern is repeated on all ShardingDDLCoordinators.
To solve it we could synchronize access to the in-memory state with a mutex, similarly to what was done on SERVER-54300. In this case, we need to make sure that writing the document to disk is not done with the mutex held (see SERVER-53996).
- is duplicated by
-
SERVER-66439 Concurrent `checkIfOptionsConflict` running while state doc is being updated
- Closed
-
SERVER-65500 Unprotected concurrent access to coordinator doc member variable by DDL coordinator implementations
- Closed
- related to
-
SERVER-66439 Concurrent `checkIfOptionsConflict` running while state doc is being updated
- Closed