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

'WaitUntilReady' appears to have inconsistent retry behviour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.1.2
    • 2.1.1
    • library
    • None
    • 1

    Description

      What's the test case?
      Attempting to connect to a node where memcached has crashed/been restarted/is unreachable. The memcached process will be available well within the connection timeout provided to the 'WaitUntilReady' function.

      Steps to reproduce
      I've provided a shell script and a Go file to reproduce this issue. You will likely have to edit the Go file to change the hostname/credentials for your Couchbase node. The steps it takes are as follows:
      1) Run 'kill -STOP $(pgrep memcached)' to pause memcached
      2a) Run the provided Go file to create a gocbcore agent and connect to the node with a 60 second timeout.
      2b) Run 'kill -CONT $(pgrep memcached)' after 15 seconds to resume memcached
      3) Sleep for 10 seconds
      4) Run the provided Go file to prove the node is up and accepting connections (we should see "Connected!" printed to stdout)
      5) Wait for the first connection to succeed/fail (we should see it fail)

      We should see that the last 45 seconds of the connection timeout for the first agent will eventually be exhausted and the program will panic with an 'unambiguous timeout' error.

      What do I expect to see?
      The first agent should be able to successfully retry the connection to the node within the final 45 seconds of its timeout and shouldn't return an unambiguous timeout error. It's worth noting that I see this behavior if the sleep before resuming memcached is reduced to about 5 seconds. This is something that cbbackupmgr is expected to be resilient to as such there are QE tests in place which are currently failing see MB-39632 for more information.

      Attachments

        1. test.go
          1 kB
        2. test.sh
          0.1 kB

        Issue Links

          For Gerrit Dashboard: GOCBC-908
          # Subject Branch Project Status CR V

          Activity

            People

              charles.dixon Charles Dixon
              james.lee James Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty