[SERVER-52556] Make multiple lookups within a snapshot from the CollectionCatalog consistent Created: 02/Nov/20 Updated: 29/Jan/24 Resolved: 13/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Henrik Edin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||||||||||
| Sprint: | Execution Team 2020-11-16, Execution Team 2020-11-30 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Implement copy-on-write on the CollectionCatalog. Where its data structures that contain shared pointers are copied. The new catalog instance should be able to be installed with atomic compare-and-swap and we can remove the catalog mutex that is currently there. Lock-Free read operations hold a shared_ptr to a CollectionCatalog consistent with the established storage snapshot and may perform multiple lookups from this instance that all is consistent with the storage snapshot. This should allow us to support DBDirectClient in Lock-Free Reads. |
| Comments |
| Comment by Githook User [ 13/Nov/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: |
| Comment by Githook User [ 13/Nov/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: Internal mutexes when reading CollectionCatalog are removed, just one mutex for writes are needed. |
| Comment by Githook User [ 13/Nov/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: |