[SERVER-54066] Out-of-order destruction of multiple AutoGetCollectionForRead*LockFree helpers can result in unstashing the CollectionCatalog before all instances are done using it Created: 26/Jan/21  Updated: 29/Oct/23  Resolved: 17/Feb/21

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-55658 Out-of-order destruction of AutoGet* ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-02-22
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 17/Feb/21 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-54066 Retain stashed CollectionCatalog in the case of out-of-order destruction of AutoGetCollectionForRead*LockFree helpers
Branch: master
https://github.com/mongodb/mongo/commit/fddc96f21b6d60f1a13d04ac36b10a8ad0f056c2

Generated at Thu Feb 08 05:32:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.