Details

      Description

      Allow access to the list of active cursors.

      This should allow returning something like this:

      > db.runCommand("listCursors")
      { ok:1.0,
       cursors: [
          {
      	id:..., 
      	ns:..., 
      	query:..., 
      	client:..., 
      	created:...., 
      	lastAccess:..., 
      	noTimeout:.., 
      	timeoutInMS:..., 
      	runningMS:...,
      	yieldNum:...,  
      	user:..., 
      	nReturned:..., 
      	nPosition:..., 
      	...} //recordStats/locks/curOp-info/etc
        ]
      }
      

      This command should be user-aware and only return cursors for the active user.

      Paramters:

      name value desc/behavior
      filter <any query filter>, {id:###} This should allow a filter/match param to reduce the total set of cursors returned.
      ns/db   filters to this ns/db – command name value is the default for this if not true-ish
      user <current> This command should be user-aware and only return cursors for the active user. Optionally this should allow overriding to return all user info if the user has privs

        Issue Links

          Activity

          Hide
          dwight_10gen Dwight Merriman added a comment -

          is this needed?

          Show
          dwight_10gen Dwight Merriman added a comment - is this needed?
          Hide
          scotthernandez Scott Hernandez (Inactive) added a comment -

          If you ever want the client to be able to cleanup cursors (like a purge), then yes; the drivers have bugs where they don't cleanup – we have seen this many times.

          It seems like for no other reason than at the moment you can't get a list of the current (no_timeout) cursors. Would you rather create a special $collection instead?

          Show
          scotthernandez Scott Hernandez (Inactive) added a comment - If you ever want the client to be able to cleanup cursors (like a purge), then yes; the drivers have bugs where they don't cleanup – we have seen this many times. It seems like for no other reason than at the moment you can't get a list of the current (no_timeout) cursors. Would you rather create a special $collection instead?
          Hide
          antoine Antoine Girbal (Inactive) added a comment -

          we should also add a killCursor command, that does the same thing as the wire protocol kill cursor.
          It would be 1 less thing to implement at a low level in drivers.
          Also could make it easier for security handling.

          Show
          antoine Antoine Girbal (Inactive) added a comment - we should also add a killCursor command, that does the same thing as the wire protocol kill cursor. It would be 1 less thing to implement at a low level in drivers. Also could make it easier for security handling.
          Hide
          shaggie76 Glen Miner added a comment -

          This would really, really help us try to avoid problems causing https://jira.mongodb.org/browse/SERVER-17364 which is causing us increasing anxiety – is there any other way to list cursors in a way that might help us track down where the leak is coming from?

          Show
          shaggie76 Glen Miner added a comment - This would really, really help us try to avoid problems causing https://jira.mongodb.org/browse/SERVER-17364 which is causing us increasing anxiety – is there any other way to list cursors in a way that might help us track down where the leak is coming from?
          Hide
          ssimpson@elance-odesk.com Scott Simpson added a comment -

          We need this now. On any roadmap? Seems like it would be easy to implement.

          Show
          ssimpson@elance-odesk.com Scott Simpson added a comment - We need this now. On any roadmap? Seems like it would be easy to implement.
          Hide
          david.storch David Storch added a comment -

          Scott Simpson, this currently has a fixVersion of "planned but not scheduled". This means that it is work which we would like to do, but it is not yet targeted for any particular version.

          Show
          david.storch David Storch added a comment - Scott Simpson , this currently has a fixVersion of "planned but not scheduled". This means that it is work which we would like to do, but it is not yet targeted for any particular version.
          Hide
          itso@eyeviewdigital.com Itso Slavchev added a comment - - edited

          Would love to have the ability to get a list of open noTimeout cursors too.. Also having troubles with identifying the root cause for our ever growing number of open cursors.

          Show
          itso@eyeviewdigital.com Itso Slavchev added a comment - - edited Would love to have the ability to get a list of open noTimeout cursors too.. Also having troubles with identifying the root cause for our ever growing number of open cursors.

            People

            • Votes:
              56 Vote for this issue
              Watchers:
              58 Start watching this issue

              Dates

              • Created:
                Updated: