-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.16, 7.0.12, 5.0.28, 8.0.0-rc15
-
Component/s: None
-
Cluster Scalability
-
Fully Compatible
-
ALL
-
v8.0, v7.0, v6.0
-
Cluster Scalability Priorities
-
200
The TransactionCoordinatorService will create its _catalogAndScheduler, with an invariant that it doesn't already exist, when stepping up or during sharding initialization as a primary.
However, if a secondary initiates a priority takeover and replicates the ShardingIdentity document from addShard as part of primary catch-up, it's possible that:
- Sharding initialization begins after the node is already primary according to this check.
- The TransactionCoordinatorService creates its _catalogAndScheduler.
- Sharding initialization completes.
- Replication invokes the _shardingOnTransitionToPrimaryHook and sees that sharding is already initialized.
- TransactionCoordinatorService::onStepUp tries to create the _catalogAndScheduler again, and triggers the invariant.
- is related to
-
SERVER-98778 Coverity analysis defect 163833: Check of thread-shared field evades lock acquisition
- Investigating