[SERVER-59913] Make CollectionPtr instances fetched directly from the CollectionCatalog invariant if any yield()/restore() is attempted Created: 13/Sep/21  Updated: 29/Oct/23  Resolved: 07/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

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

Issue Links:
Duplicate
is duplicated by SERVER-70846 Create interface for users to customi... Closed
Related
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-02-21, Execution Team 2023-02-20, Execution Team 2023-02-06
Participants:

 Description   

Any code directly accessing a CollectionPtr through the CollectionCatalog interface should not have yield/restore capability. Only AutoGet* helpers should have CollectionPtr instances that yield. This ensures that the CollectionPtr is properly set up for the use case.

Places like this CollectionCatalog function should return a default lambda that just invariants. The AutoGet helpers should always explicitly set the restoreFromYieldFn.



 Comments   
Comment by Githook User [ 07/Feb/23 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-59913 Move CollectionPtr yield logic out of the CollectionCatalog

CollectionPtr is no longer yieldable by default, to make them yieldable you must explicitly call 'makeYieldable'.

This removes some dependencies from the CollectionCatalog and allows us to set up how yielding should work in the AutoGet layer. This could also be a stepping stone to completely remove CollectionPtr from the interfaces of CollectionCatalog.
Branch: master
https://github.com/mongodb/mongo/commit/50437919c2892e44c4afac4b0047952a9046829c

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