Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19570

Shell should issue kill against find command cursors when the cursor object is destroyed

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.7
    • Affects Version/s: None
    • Component/s: Querying, Shell
    • Labels:
      None
    • Fully Compatible
    • QuInt 8 08/28/15

      • 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.

            Assignee:
            qingyang.chen Qingyang Chen
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: