[SERVER-73766] Implement a ScopedLocalCatalogWriter utility Created: 08/Feb/23 Updated: 29/Oct/23 Resolved: 30/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-2144-Milestone-0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Sprint: | Sharding EMEA 2023-02-20, Sharding EMEA 2023-03-06, Sharding EMEA 2023-03-20, Sharding EMEA 2023-04-03 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 135 | ||||||||||||||||||||||||||||||||
| Description |
|
The CollectionWriter (and it's sibling AutoGetCollection::getWritableCollection) paradigms are really an attempt to provide a "see your own catalog writes" semantics for catalog changes performed while holding an AutoGetCollection. This ticket is proposing to implement a proper utility which ensures that all collection acquisitions held by an operation automatically see any catalog writes performed by the code path on which they have been placed. The semantics of this utility will be:
ContextThe AutoGetXXX utilities and the CollectionPtr are really caches of a particular collection from the CollectionCatalog, which itself is a cache of the persistent WT state on disk. The CollectionWriter utility serves two purposes:
The ScopedCollectionOrView acquisition class is really a more complete cache of the entire catalog information for a collection (sharding + local) and at the end of PM-2144, no code paths should be interacting with the catalog outside of ScopedCollectionOrView. The ScopedLocalCatalogWriter described in this ticket will provide the release semantics described above, without dangling memory bugs like |
| Comments |
| Comment by Githook User [ 30/Mar/23 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: |
| Comment by Githook User [ 24/Mar/23 ] |
|
Author: {'name': 'Sviatlana Zuiko', 'email': 'sviatlana.zuiko@mongodb.com', 'username': 'szuiko'}Message: Revert " This reverts commit 7a62847796d3797278a7b5fb6215948cd325b45d. |
| Comment by Githook User [ 22/Mar/23 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: |
| Comment by Githook User [ 16/Mar/23 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: |
| Comment by Githook User [ 23/Feb/23 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: |