[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: |
|
||||||||||||
| 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: 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. |