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

Eliminate possibility of false sharing in partitioned lock

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.10
    • Component/s: Concurrency, Performance
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Platforms 2017-07-10

      Description

      The vector of mutexes inside catalog/util/partitioned.h does not ensure that the locks are on different cache lines.

      Ideally, we would use C++17's std::hardware_destructive_interference_size and alignas to fix this, however, not all of our toolchains currently support the required extended alignment.

      Instead, as a simpler fix, we should just allocate the mutexes on the heap, which is very likely to ensure that they land on different cachelines.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: