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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.1.7
    • Querying, Shell
    • None
    • Fully Compatible
    • QuInt 8 08/28/15

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: