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

Provide a command to list all locks

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Diagnostics, Storage
    • Labels:
      None
    • Sprint:
      Storage NYC 2019-03-11
    • Case:

      Description

      Support engineers have to inspect mongod logs whenever there is a locking related issue. That approach is suboptimal as logs can be large and not straightforward to process. Also log analysis is often time consuming.

      Another approach is to get the locks information from the db.currentOp() output, however the output of that command is thread-centric, not lock centric. Often the question is simply "who's holding the global/database/collection lock". It should not be required to iterate through all of the threads in the db.currentOp() output to get the answer.

      It would be great to have a separate command that would produce a list of the MongoDB locks (e.g. Global, Metadata, Database, Collection; the latter two should indicate the names of the database objects associated with them) along with the information on the threads (e.g. thread names) that are holding them. The command should not be blocking and should not require a lock (not sure if doable).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              geert.bosch Geert Bosch
              Reporter:
              dmitry.ryabtsev Dmitry Ryabtsev
              Participants:
              Votes:
              15 Vote for this issue
              Watchers:
              24 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: