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

db.currentOp(True) does not return client information on idle connections

    • Fully Compatible
    • ALL

      Simple Repro:

      • Spin up mongod 3.0.2, default options are fine.
      • Open five mongo shells against it.
      • db.currentOp(true) in one of them.

      The entries for the four idle shells will look like:

      		{
      			"desc" : "conn5",
      			"threadId" : "0x7fb07b80e310",
      			"connectionId" : 5,
      			"active" : false
      		},
      

      Perform the same steps in 2.6.9, and you get back something akin to:

      		{
      			"opid" : 25,
      			"active" : false,
      			"op" : "query",
      			"ns" : "",
      			"query" : {
      				"isMaster" : 1,
      				"forShell" : 1
      			},
      			"client" : "127.0.0.1:63404",
      			"desc" : "conn3",
      			"threadId" : "0x106e04000",
      			"connectionId" : 3,
      			"waitingForLock" : false,
      			"numYields" : 0,
      			"lockStats" : {
      				"timeLockedMicros" : {
      					
      				},
      				"timeAcquiringMicros" : {
      					
      				}
      			}
      		},
      

      Having the client information available, even for idle connections, is quite useful in some diagnostics processes, including tracking all of the applications which are connected at any given time.

        1. first.jpeg
          386 kB
          Ambikesh Kumar Shukla

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            rod.adams@mongodb.com Rod Adams
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: