Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4260

AsyncQueryBatchCursor should not try to kill the server cursor if pinned connection is corrupted

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • 4.3.0
    • Connection Management
    • None

    Description

      When working in LB mode, both QueryBatchCursor and AsyncQueryBatchCursor pin a connection and use it for both issuing getMore and killCursors command. If a network error happens while doing getMore, the driver closes the Stream underlying the pinned connection and the connection cannot be used anymore. Thus, the QueryBatchCursor/AsyncQueryBatchCursor should not even try using it. QueryBatchCursor was changed to behave as described when the LB support was implemented, but AsyncQueryBatchCursor was not.

      Note that it may be tempting to release the pinned connection and the connection source when a network error happens, but there is a specification test cursors.json: "pinned connections are not returned after an network error during getMore" that unfortunately prevents exactly this. Hopefully it will be gone in the future as a result of DRIVERS-1847.

      Attachments

        Activity

          People

            Unassigned Unassigned
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: