Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-1501

WaitUntilReady must not wait for services absent from alternate address

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.7.1
    • None
    • None
    • None
    • 3
    • SDK12: Scp Fnc, FIT, Misc, SDK14: CLoE + Others, SDK16: Clmnr Proto & C++, SDK18, SDK20, SDK22, SDK24

    Description

      Suggested Release Note:

      In Couchbase Server deployments that use alternate addresses but do not expose all services on the alternate network, `waitUntilReady` no longer times out waiting for the services that don't have alternate addresses.

       

      When `waitUntilReady` is called without a list of services, `HealthPinger.extractPingTargets` erroneously returns targets that are not exposed via alternate addresses.

      To reproduce the issue with a local single-node cluster, configure alternate addresses with this curl command:

      curl -v -X PUT -u Administrator:password http://127.0.0.1:8091/node/controller/setupAlternateAddresses/external -d hostname=127.0.0.1 -dmgmt=8091 -dkv=11210 

      This config means that when the SDK connects to the node via the `external` network, only the KV and management services are accessible.

      Now set  breakpoint at the end of `HealthPinger.extractPingTargets` and run this code:

      Cluster cluster = Cluster.connect("127.0.0.1?network=external", "Administrator", "password");
      Bucket bucket = cluster.bucket("travel-sample");
      bucket.waitUntilReady(ofSeconds(10)); 

      The expected result is a one-element list with a single target for the KV service, since that's all that's accessible on the external network.

      The actual result includes VIEWS, QUERY, ANALYTICS, and SEARCH as well (or whatever services are actually running on the server).

      Attachments

        Issue Links

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

          Activity

            People

              david.nault David Nault
              david.nault David Nault
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty