[SERVER-3090] Add the ability to list open cursors Created: 13/May/11 Updated: 07/Apr/23 Resolved: 12/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin, Diagnostics, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.5 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 78 |
| Labels: | asya, commands, diagnostics, lntrospection | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query
|
||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2018-07-16, Query 2018-07-30 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
Allow access to the list of active cursors. This should allow returning something like this:
This command should be user-aware and only return cursors for the active user. Paramters:
|
| Comments |
| Comment by Ted Tuckman [ 12/Oct/18 ] | |
|
In the upcoming 4.1.5 release the currentOp aggregation stage will be able to list idleCursors. If "idleCursors: true" is passed to currentOp, each cursor will get one document in the output with "type: idleCursor." Example:
In addition, during an active operation the "type: op" document will have a cursor field with information about the cursor it is using if it is using a cursor.
More extensive documentation of this feature will be provided in the future. To see the current documentation of the $currentOp stage, click here. | |
| Comment by Lucas [ 08/Feb/18 ] | |
|
We definitely need this | |
| Comment by Itso Slavchev [ 06/Jun/17 ] | |
|
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. | |
| Comment by David Storch [ 09/Jan/17 ] | |
|
ssimpson@elance-odesk.com, 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. | |
| Comment by Scott Simpson [ 07/Jan/17 ] | |
|
We need this now. On any roadmap? Seems like it would be easy to implement. | |
| Comment by Glen Miner [ 27/May/15 ] | |
|
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? | |
| Comment by Antoine Girbal [ 14/May/13 ] | |
|
we should also add a killCursor command, that does the same thing as the wire protocol kill cursor. | |
| Comment by Scott Hernandez (Inactive) [ 13/May/11 ] | |
|
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? | |
| Comment by Dwight Merriman [ 13/May/11 ] | |
|
is this needed? |