[SERVER-17792] Shell doesn't close cursor when limit met Created: 30/Mar/15  Updated: 07/Oct/15  Resolved: 18/Sep/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.4.9, 2.6.9, 3.0.1, 3.1.0
Fix Version/s: 3.1.9

Type: Bug Priority: Major - P3
Reporter: David Hows Assignee: Jonathan Reams
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before SERVER-17767 Remove the code that ignores EBUSY re... Closed
Related
related to SERVER-16457 WT verify and salvage operations fail... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Build 9 (09/18/15)
Participants:

 Description   

If you issue a query with a limit via the shell, the cursor created is left open on the server and is unable to be closed.

This is limited to the shell, as all drivers will issue a killCursors when the limit has been met.

t = db.cursor_test;
t.drop();
pre = db.serverStatus().cursors.totalOpen;
 
for ( i=1; i<=50; i++){
    t.save( { a : i } );
}
t.find().limit(3);
 
assert.eq(pre,db.serverStatus().cursors.totalOpen)



 Comments   
Comment by Githook User [ 18/Sep/15 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-17792 Kill cursors when query limit is reached in the shell
Branch: master
https://github.com/mongodb/mongo/commit/523f9389dafb53151800cf6f17b3d6a7d4fbfebe

Comment by Githook User [ 15/Sep/15 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: Revert "SERVER-17792 Kill cursors when query limit is reached in the shell"

This reverts commit aaa8ea34945e4d4330a2d71c69c81f51824cf251.
Branch: master
https://github.com/mongodb/mongo/commit/bded2a3deda7dd1152d69b3c5892b59eea7d7ff2

Comment by Githook User [ 15/Sep/15 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-17792 Kill cursors when query limit is reached in the shell
Branch: master
https://github.com/mongodb/mongo/commit/aaa8ea34945e4d4330a2d71c69c81f51824cf251

Comment by Scott Hernandez (Inactive) [ 30/Mar/15 ]

Just repro'd with master, 2.4, 2.6, 3.0; I'm guessing that the shell has never issued a killCursors when it hits its limit.

Comment by Eric Milkie [ 30/Mar/15 ]

What version of the shell?

Generated at Thu Feb 08 03:45:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.