Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76355

Refactor ConcurrentSharedValuesMap to use immutable map

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 3

      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.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: