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

Buffer is leaked from buffer pool on socket exception

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.6.0
    • Affects Version/s: None
    • Component/s: Internal
    • None

      In SocketStream#read, the ByteBuf is not released if an exception is thrown. As a result the buffer will be GC'd but will not be returned to the buffer pool. This is a performance issue, but also a correctness issue, as it will result in a permit never being released. Eventually, an application could run out of permits (although currently there are Integer#MAX_VALUE permits available so it's unlikely.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: