-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
As part of SERVER-90992 we want to avoid abandoning a snapshot while holding a CollectionPtr using establishConsistentCollection from the catalog.
In the CollectionScan stage we explicitly abandon the snapshot if we're accessing the oplog and we must wait for earlier oplog writes to be available. This could cause the oplog's collectionPtr to become invalidated if a concurrent DDL operation would occur on it and we were forced to open a collection instance tied to the lifetime of the WT snapshot. As a result, we would be interacting with an invalid pointer to freed memory.
Note that we also explicitly abandon the snapshot again when calling waitForAllEarlierOplogWritesToBeVisible and explicitly invariant the server if a snapshot is open at the time of calling.
Ideally we should avoid doing this and instead rely on the internal yield mechanism that already exists for query plans to abandon the snapshot and continue the execution.
- is related to
-
SERVER-90992 Collection acquisitions have no enforcement of snapshot stability
- Open