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

Determine whether we need const CollectionShardingState/DatabaseShardingState instances for Lock-Free Reads

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Execution Team 2020-12-28, Execution Team 2021-01-11, Execution Team 2021-01-25, Execution Team 2021-02-08, Execution Team 2021-02-22

      Currently we're adding shared_ptr getters to the interfaces in SERVER-51319.

      Ideally, CSS::getShared, etc., would return const pointers, but would require further interface changes to accept const pointers. Also, without const pointers, or more accurately without copy-on-write, the metadata instance fetched can be modified during a read. (internally, Collection/DatabaseShardingState have concurrency control via mutex, but state still changes??)

      Maybe this is safe, but need to double check, particularly with things like the resharding project coming up?

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: