Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1177

Connection closed during bootstrap can cause bootstrap loop

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • core-10.0.4, 2.3.3
    • None
    • None
    • 1

    Description

      It's possible for the sdk to establish a connection to the server but during bootstrap for the server to terminate the connection. When this happens the SDK can get into a state where the memdclient is already closed and tries to dispatch one of the bootstrap operations.

      This leads to the memdclient rejecting the operation with a request cancelled error. If this error is returned for a bootstrap critical operation (e.g. auth) then bootstrap is failed and the error returned to the memdclient dialler.

      If bootstrap fails against a node then the dialler will wait a set amount of time before re-attempting bootstrap against that node. This wait does not happen when bootstrap fails with a request cancelled error, like returned in the scenario above. This leads the SDK to immediately retry bootstrap, which can lead to all this retriggering from the top and leading to a loop of bootstrapping.

      An effect of this is that we create a large number of buffered readers for connections in rapid succession, each 20MB. This can lead to an explosion in the memory usage of the SDK.

      Attachments

        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

            charles.dixon Charles Dixon
            charles.dixon Charles Dixon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty