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

Remove mutex guards on read access for _shardId and _clusterId in ShardingState

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.4
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2020-02-10
    • 0

    Description

      The ShardingState mutex guard for data read access on these variables is unnecessary, due to existing invariants that:

      1. Prevent the ShardingState from being initialized twice.
      2. Prevent the ShardingState's state variables (_shardId, _clusterId) from being accessed before initialization.

      Removing these read access mutex acquisitions will reverse the performance drop found in BF-16012.

      Attachments

        Activity

          People

            blake.oler@mongodb.com Blake Oler
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: