[SERVER-19570] Shell should issue kill against find command cursors when the cursor object is destroyed Created: 23/Jul/15  Updated: 19/Sep/15  Resolved: 12/Aug/15

Status: Closed
Project: Core Server
Component/s: Querying, Shell
Affects Version/s: None
Fix Version/s: 3.1.7

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: Qingyang Chen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt 8 08/28/15
Participants:

 Description   
  • The DBCommandCursor method _hasNextUsingCommands() should zero the "cursorId" property if the cursor has been exhausted.
  • A new derived class of mozjs::BaseInfo called CursorHandleInfo should be added, which should use the JSCLASS_HAS_PRIVATE class flags to store a shared pointer to a DBClientBase. CursorHandleInfo's finalize method should read the property "cursorId" from the given object (see mozjs/oid.cpp for an example), and issue an OP_KILL_CURSORS message (with DBClientBase::killCursor()) against the server if the cursorId is non-zero.
  • A new function "cursorHandleFromId" should be installed in mozjs::MongoBase, which should return a CursorHandleInfo object created with the MongoBase's connection and the given cursorId.
  • The DBCommandCursor constructor should add a new property to the object called _cursorHandle in read commands mode, which should be initialized from cursorHandleFromId().
  • The tests disabled below should be re-enabled.


 Comments   
Comment by Githook User [ 12/Aug/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-19570 Issue kill against find command cursors in shell when cursor object is destroyed
Branch: master
https://github.com/mongodb/mongo/commit/ca402fdcd2b416fb91ad08b886c53551ea9ebee0

Comment by Githook User [ 28/Jul/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-19570 disable tests
Branch: master
https://github.com/mongodb/mongo/commit/d2f66cef3c01eef0629926ec27b5eb5080a97858

Comment by David Storch [ 27/Jul/15 ]

As part of the work for this ticket, tests disabled in https://github.com/mongodb/mongo/commit/d2f66cef3c01eef0629926ec27b5eb5080a97858 should be re-enabled.

Comment by Githook User [ 27/Jul/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-19570 disable tests
Branch: master
https://github.com/mongodb/mongo/commit/d2f66cef3c01eef0629926ec27b5eb5080a97858

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