Reduce performance change from StorageChangeContext

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Matthew Russotto
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: