Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1026

Early unsubscription on Observables (like timeout()) can trigger buffer leak

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.3.6
    • None
    • None

    Description

      If early unsubscribes on the KV API are performed (that is, the async API is used and an operator like timeout() fires before the data could be decoded and the underlying buffers freed) the buffers from the decoding operation are not freed and leak.

      If you are using the blocking / synchronous API you are not affected by this. Also, if async operations go through normally no data will leak. Only if for example a timeout is set on an async operation and it times out it could be that the underlying buffer is not freed. Since timeouts should not happen in stable applications you are most likely fine. If you are seeing leaks reported in your logs, please add a comment here.

      The workaround is to disable buffer pooling on the CouchbaseEnvironment which in turn will prevent buffers from leaking out of the buffer pool (since they are unpooled in the first place)

      We are working to resolve this in the next bugfix release with highest priority.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            There are no comments yet on this issue.

            People

              daschl Michael Nitschinger
              daschl Michael Nitschinger
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty