The top level AutoGetCollectionForReadLockFree instance stashes a copy of the CollectionCatalog as a shared pointer on the OperationContext. When it destructs, the stashed CollectionCatalog is removed. However, subsequently created AGCFRLR instances use the first instance's stash and do not create their own. So out of order destruction, i.e. the first instance is destroyed before the later ones, will cause the later ones to default back to the latest CollectionCatalog, no longer using consistent in-memory and on-disk state.
Code references:
This is important for query SBE. Currently getMore does out-of-order AGCFRLF destruction, and other cmds will in the immediate future.
- is related to
-
SERVER-55658 Out-of-order destruction of AutoGet* objects can lead to transaction closure
- Closed