Details
-
Bug
-
Resolution: Fixed
-
Major
-
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
- depends on
-
JVMCBC-1527 Refactor cluster topology parser
- Closed