CheckMetadataConsistency uses the sharding metadata installed on the shards to determine if a shard currently owns chunks of a collection. And based on that, it determines if the collection should be present on the local catalog and flags an inconsistency if it isn't.
CheckMetadataConsistency reads the sharding metadata by using CollectionShardingRuntime::getCurrentMetadataIfKnown, which ignores the critical section state – it simply returns the currently installed metadata, even if the critical section is active. If it is active, then the currently installed metadata might not be the valid one, since it is currently being changed. This can cause CheckMetadataConsistency to report false positives.
- is related to
-
SERVER-97461 Investigate troubling interleavings between checkMetadataConsistency and config transitions
-
- Closed
-
- related to
-
SERVER-96906 checkMetadataConsistency can hit tripwire assert while checking shard key index due to local collection dropped mid-check by dedicated config server transition
-
- Needs Scheduling
-