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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Storage
    • Labels:
    • Sprint:
      Execution Team 2019-07-01, Execution Team 2019-07-15

      Description

      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.

       

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: