[SERVER-76355] Refactor ConcurrentSharedValuesMap to use immutable map Created: 20/Apr/23  Updated: 03/Nov/23

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

Type: Improvement Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: car-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-76354 Modify ConcurrentSharedValuesMap to u... Closed
Assigned Teams:
Catalog and Routing
Participants:
Story Points: 3

 Description   

Right now the class relies on using an atomic shared_ptr. On every update the map gets copied and the update is performed on the copy, then the new map is wrapped in a shared_ptr and swapped with the old one.

This use-case is quite similar to the one provided by our immutable maps so it should be quite simple to replace it. This would also help remove usage of the atomic shared_ptr functions as they are deprecated as of C++20 and the replacement is more or less banned in the server codebase.



 Comments   
Comment by Jordi Olivares Provencio [ 20/Apr/23 ]

Note that immutable maps only exist since 7.0

Generated at Thu Feb 08 06:32:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.