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

AsyncQueryBatchCursor does not release ConnectionSource when closed

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.2.1
    • None
    • Reactive Streams
    • None

    Description

      AsyncQueryBatchCursor#close does not release its reference to the ConnectionSource. This is not a problem if iteration completes successfully, as the getMore callback releases it when the server cursor is exhausted. But if iteration is interrupted due to error or the cursor is not fully iterated by the application, the reference will never get released. This can cause a leak, as a ConnectionSource can hold a reference to a resource (most likely a ClientSession.

      Attachments

        Activity

          People

            valentin.kovalenko@mongodb.com Valentin Kavalenka
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: