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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 4.3.0
    • Fix Version/s: None
    • Component/s: Connection Management
    • Labels:
      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

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              valentin.kovalenko Valentin Kavalenka
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: