Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Catalog and Routing
-
2
Description
The collection catalog allows a user to acquire the latest version of the catalog by calling CollectionCatalog::get(opCtx) without having a snapshot open.
However, this leaves open the possibility of first doing some computations on the catalog, acquiring the correct snaphsot via shard role acquisiton/AutoGetter, then getting the correct Catalog and continuing with the same assumptions.
This could lead to potential query/data inconsistencies if we had something existing at the latest catalog but not in the snapshotted one and the rest of the code assuming the first catalog for operations instead.
To avoid this we should forbid the implicit acquisition of the latest catalog without a snapshot and add an invariant that crashes the server if accessing the catalog without a snapshot open. We should still allow a user to explicitly ask for the latest version however.
Attachments
Issue Links
- related to
-
SERVER-84238 Inconsistent Catalog access during aggregations
-
- Closed
-