-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
ALL
establishConsistentCollection is used to establish a collection pointer consistent with the storage snapshot. When a DDL is commit pending, the CollectionCatalog's latest state cannot be trusted, and the collection needs to be opened from storage to double check.
However,_needsOpenCollection only checks if a namespace is commit pending when no read timestamp is provided. Theoretically, it is possible for a caller of establishConsistentCollection to pass in the timestamp of a durably persisted DDL operation, which has yet to publish the changes to the CollectionCatalog (is in_pendingCommitUUIDs), and incorrectly get a Collection pointer which is not consistent with the snapshot.
E.g. if the DDL is a drop committed at TS100, a concurrent query reading at TS100 might get the collection pointer from before the drop.
For this to be possible though, the timestamp has to become externally visible.
We should:
- investigate if this is indeed possible.
- fix the behaviour so it is correct by design, even if we end up discovering it is not possible in practice.