[SERVER-47885] Have lookupCollectionBy{Namespace,UUID} return a shared_ptr Created: 01/May/20 Updated: 29/Oct/23 Resolved: 07/Aug/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Geert Bosch | 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 | ||||||||||||||||||||
| Sprint: | Execution Team 2020-05-18, Execution Team 2020-06-01, Execution Team 2020-06-29, Execution Team 2020-07-13, Execution Team 2020-07-27, Execution Team 2020-08-10 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||
| Description |
|
Have CollectionCatalog::lookupCollectionBy {Namespace,UUID}return shared_ptr<const Collection>, so it can be used without further locking or other concurrency control. |
| Comments |
| Comment by Githook User [ 07/Aug/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: AutoGetCollectionForRead and AutoGetCollectionForReadCommand now uses this and holds the shared_ptr. They return the collection as const. Moved some logic from Collection destructors to deregister from the catalog as they may now be destroyed at a later point. |