CurOp::completeAndLogOperation should not hang waiting for global lock

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.9, 4.1.10
    • Affects Version/s: None
    • Component/s: Concurrency
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Storage Engines 2019-03-11, Storage Engines 2019-03-25
    • 32
    • 8
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When logging a command (either slow or when forced logging is enabled) CurOp::completeAndLogOperation attempts to take a global lock to obtain storage statistics. If something else has a Global X lock (or an enqueued Global X lock), this lock acquisition will stall behind that operation. This introduces an undesirable dependency on the global lock for otherwise lock-free operations such as $currentOp.

      We should give this acquisition a very short deadline and elide the storage stats when it is not available.

              Assignee:
              Sulabh Mahajan
              Reporter:
              Matthew Russotto
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: