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

Replace serverStatus.locks with array of dbs

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, Diagnostics
    • Labels:
    • Replication

      Currently server.locks returns a document with a field for each db, but db names can have chars that are not allowed for storage in mongodb ("$", ".")

      If we return an array instead of a document then we can save them.

      "locks" : {
        "." : {
          "timeLockedMicros" : {
            "R" : NumberLong(0),
            "W" : NumberLong(10898)
          },
          "timeAcquiringMicros" : {
            "R" : NumberLong(0),
            "W" : NumberLong(4990)
          }
        },
        "admin" : {
          "timeLockedMicros" : {
            "r" : NumberLong(20),
            "w" : NumberLong(0)
          },
          "timeAcquiringMicros" : {
            "r" : NumberLong(2),
            "w" : NumberLong(0)
          }
        },
        "local" : {
          "timeLockedMicros" : {
            "r" : NumberLong(36),
            "w" : NumberLong(0)
          },
          "timeAcquiringMicros" : {
            "r" : NumberLong(9),
            "w" : NumberLong(0)
          }
        }
      

      should become:

      "locks" : [
        { "database" : ".", 
          "timeLockedMicros" : {
            "R" : NumberLong(0),
            "W" : NumberLong(10898)
          },
          "timeAcquiringMicros" : {
            "R" : NumberLong(0),
            "W" : NumberLong(4990)
          }
        },
        { "database" : "admin", 
          "timeLockedMicros" : {
            "r" : NumberLong(20),
            "w" : NumberLong(0)
          },
          "timeAcquiringMicros" : {
            "r" : NumberLong(2),
            "w" : NumberLong(0)
          }
        },
        { "database" : "local",
            "timeLockedMicros" : {
            "r" : NumberLong(36),
            "w" : NumberLong(0)
          },
          "timeAcquiringMicros" : {
            "r" : NumberLong(9),
            "w" : NumberLong(0)
          }
        }
      ]
      

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: