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

CurOp::completeAndLogOperation should not hang waiting for global lock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.9, 4.1.10
    • Component/s: Concurrency
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Sprint:
      Storage Engines 2019-03-11, Storage Engines 2019-03-25
    • Linked BF Score:
      32
    • Story Points:
      8

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sulabh.mahajan Sulabh Mahajan
              Reporter:
              matthew.russotto Matthew Russotto
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: