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

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • 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

    Description

      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?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: