-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JVMCBC-1512 SDK fails to adapt to new cluster topology if only a port…
… changed Motivation ---------- The SDK wasn't noticing when a service moved from one port to another on the same node. Modifications ------------- When adding a service, check for an existing service on a different port. If one is found, remove it before adding the new service. Incidentally: * Removed `synchronized` keyword from `addService()` and `removeService()`, since it was protecting only Mono creation, not execution. Config updates are serialized anyway; no synchronization needed. * De-Mono-ify one of the `removeService` methods, so `addService` can call it easily. (Not a big change, since removeService was basically a blocking method wrapped in a Mono even before this.) * Lift the service host:port calculation from `createService` up into into `addService`, so `addService` can compare against an existing service address. * Add `Service.address()`, so `addService` can easily see the address of an existing service. This convenience method protects callers from having to dig around in the service context. Change-Id: I93aa63ca5d313401a96d7df5ba369c10454fbf7e Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/208846 Reviewed-by: Michael Reiche <michael.reiche@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
- Loading branch information
Showing
3 changed files
with
140 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.