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

currentOp should report locks held and locks waiting to be acquired separately; and report lock ResourceIds

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
    • Storage Execution
    • Execution Team 2019-07-01, Execution Team 2019-07-15

      currentOp should report locks held and locks waiting to be acquired separately. For example, in this excerpt from a currentOp op result,  the lock we're waiting for is presumably the Database W (X), but it should say so.

      "locks" : {
            "Global" : "w",
            "Database" : "W"
      "waitingForLock" : true,
      "lockStats" : {
            "Global" : {
                  "acquireCount" : {
                        "r" : NumberLong(1),
                        "w" : NumberLong(1)
            "Database" : {
                  "acquireCount" : {
                        "W" : NumberLong(1)                
                  "acquireWaitCount" : {
                        "W" : NumberLong(1)
                  "timeAcquiringMicros" : {
                        "W" : NumberLong(784623211)      

      Additionally, we have access to ResourceId information when reporting the lock information. We should add that information so that we don't have to infer which ops must be trying to get which collection/database locks from the fact that they are deadlocking. There are internal ops that either don't have the "ns" field filled out, or take collection and oplog locks; and there are transactions that now take locks across collections/databases. In conclusion, the ResourceIds would be nice to have.



            backlog-server-execution Backlog - Storage Execution Team
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            0 Vote for this issue
            12 Start watching this issue