Closed zbintliff closed 9 years ago
Hi,
ReactiveCouchbase doesn't provide anything about that as I assumed the underlying official client handle that.
What is the right way to do it with the official client ?
Does ReactiveCouchbase extend the Java official client?
The java official client has the following parameters you can use when creating a client through a CouchbaseFactoryBuilder (assuming Java Client 1.4 since 2.0 was just released):
maxReconnectDelay
:Maximum number of milliseconds to wait between reconnect attempts.
MinReconnectInterval
:Default minimum reconnect interval in milliseconds
obsPollInterval
:Wait for the specified interval before the observe operation polls the nodes.
obsPollMax
:The maximum number of times to poll the master and replicas to meet the desired durability requirements.
Essentially when the cluster connects it gets the mapping of all the nodes and polls them based on obsPollInterval
. If it receives and error it then polls again in the MinRecconnectInterval
. If it still recieves and error it increases the MinRecconnectInterval
and tries again, increasing until it is at maxreconnectDelay
. As soon as a node is failed over the next reconnect attempt provides a new mapping to the nodes. If the node is brought back up then the next reconnect returns healthy and the client continues to set to documents that are hashed there.
Ok, so I guess the actual work will be done with https://github.com/ReactiveCouchbase/ReactiveCouchbase-core/issues/26
Ok just one more thing. I see you are using couchbase 1.4.2 when the latest version is 1.4.4
In 1.4.3. there is the following bug fix: JCBC-475: The configuration management (especially with the carrier mode and during shutdown) has been reworked a little and hardened so it reacts better during node restarts and in the shutdown process of the SDK (to avoid running threads after shutdown)
So this could be the problem. There is also an issue in 1.4.2 with readFromReplica().
I'll publish a new snapshot soon with the new client version
Thank you!
Hello,
We are switching over from the official java client to the scala reactive couchbase client. While doing some tests (bouncing nodes) we noticed that the client doesn't automatically reconnect. Given that couchbase is all about high availability I'm assuming something is wrong in our application.conf.
I can't find documentation anywhere though setting reconnect attempts and time between reconnects. Can you please provide some information?