Avoid doing work in Client lock when destroying OperationContextSession

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.3
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2018-08-27, Repl 2018-09-10
    • 11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When OperationContextSession is destroyed, it destroys the operationSessionDecoration on the OperationContext under the Client lock.  Destroying the operationContextDecoration (which is a ScopedCheckedOutSession) takes the SessionCatalog mutex.  Other code takes the SessionCatalog mutex and then the Client lock (implicitly in waitForConditionOrInterruptUntil) so this causes deadlocks.

      Instead we should take the Client lock, move the ScopedCheckedOutSession from the operationSessionDecoration to a local variable, then release the Client lock and destroy the ScopedCheckedOutSession without the lock.

            Assignee:
            Matthew Russotto
            Reporter:
            Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: