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

Reduce performance change from StorageChangeContext

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Repl 2021-10-18, Repl 2021-11-01
    • 31

      The API to allow storage change introduced a mutex in the OperationContext destroy path that increased median latency but decreased 95% latency in a perfomance microbenchmark (standalone inMemory genny_scale InsertRemoveTest.Remove). This replaces the mutex acquire with a simple test on OperationContext destruction; the mutex is now only acquired during storage change.

      This also closes a narrow race where the observer could be called before the storage change, the OperationContexts iterated, and then an OperationContext released without going through the StorageChangeContext::onOperationContextDestroy code. This would result in a hang.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: