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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2020-02-10
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Blake Oler
            Reporter:
            Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: