-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 7.0.0, 8.0.0, 8.3.0, 9.0.0
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
2
-
馃煢 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
Since SERVER-90893 the listDatabases command reads the list of databases consistent to an storage snapshot, so databases created by concurrent DDLs are listed.
However the empty and size response fields聽are computed from in-memory state, which may be inconsistent (stale) compared to the storage snapshot.
聽
So for example a single atomic TXN may create the database and insert data to it, yet listDatabases may report it as:
{name: "newdb", sizeOnDisk: 0, empty: true}
聽
In the worst case if a client filters listDatabases by {empty: false}, it may miss a database like in SERVER-90893.
聽
listDatabases should acquire a single storage snapshot and compute those fields using the snapshot-aware catalog APIs (e.g. establishConsistentCollections instead of the current CollectionCatalog::range - see SERVER-122240 for information).
- is related to
-
SERVER-90893 listDatabases may not read previous DDL operations
-
- Closed
-
- related to
-
SERVER-122240 Fix internal callers of non-snapshot-aware CollectionCatalog listing methods
-
- Backlog
-