[SERVER-62196] Replace raw pointer Collection access with shared_ptr Created: 20/Dec/21  Updated: 07/Feb/22  Resolved: 07/Feb/22

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

Type: Improvement Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-62573 Update the CollectionCatalog class' d... Closed
Sprint: Execution Team 2022-02-21
Participants:

 Description   

I'm wondering whether we really need to maintain separate access functions that return raw pointer vs shared_ptr to Collection instances from the CollectionCatalog. Could we simplify code by always using shared_ptr? We're moving in that direction anyway, removing locks and supporting versioned instances and copy-on-write.

I suspect that any small performance gain of using a raw pointer instead of a shared_ptr might could irrelevant, if it exists. On the other hand, it would simplify our code to use shared_ptr consistently.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 07/Feb/22 ]

Chatted with Henrik and concluded that we actually might want the opposite, to move towards raw pointers. Closing this, and going to do some cleanup and provide clarity in SERVER-62573.

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