[SERVER-5816] Add command to get a list of open cursors Created: 10/May/12 Updated: 09/Jul/16 Resolved: 23/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin, Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | admin, api, cursors | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Comments |
| Comment by Githook User [ 07/Apr/15 ] | ||
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: Testing for kill on destruct is based on PyMongo (see: https://jira.mongodb.org/browse/SERVER-5816?focusedCommentId=201245). | ||
| Comment by Scott Hernandez (Inactive) [ 23/Jan/13 ] | ||
|
dup of | ||
| Comment by A. Jesse Jiryu Davis [ 28/Nov/12 ] | ||
|
This is crucial, it turns out, for driver testing. A common driver bug is to fail to close an open cursor that's incompletely iterated:
The code above needs to send a close-cursor message to the server once the cursor object goes out of scope. Testing that this actually happens in unittests is hard. One technique PyMongo uses is to count the number of open cursors with serverStatus command, run the test, and assert that the number of open cursors has returned to its former value. When connected to an RS or a Master, though, replication cursors come and go, and make these cursor-counting tests unreliable. | ||
| Comment by Spencer Brody (Inactive) [ 10/May/12 ] | ||
|
Potentially. At the minimum it would need to return a list of open cursor ids that could be looked up using the command from | ||
| Comment by Scott Hernandez (Inactive) [ 10/May/12 ] | ||
|
Is the goal here is to list the stats from the cursors including the position, query+opts, time-open/last-access, etc. |