BugZero found this defect 58 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/22/2024
MongoDB Server
7.0.8
7.3.0-rc8
No fixed releases provided.
When the shard is executing a checkMetadataConsistency (_shardsvrCheckMetadataConsistency) with a cluster level, it needs to know all databases which is the db primary shard. This is retrieved by a call on the config server to look for all entries in `config.databases` where the caller is the db primary shard. Then, we iterate each database found and try to acquire the DDL lock. Currently, if we receive a StaleDbVersion, the checkMetadataConsistency for that database is skipped. Receiving a StaleDbVersion at that point is because of one of the three scenarios: MovePrimary operation that has changed db primary shard. Database has been dropped Database exists but the db primary shard doesn’t know about the existence of this (cached information is marked as unknown) The goal of this ticket is to make checkMetadataConsistency not ignore scenario n.3. by triggering a refresh of that database if there is no cached information.