Closed sarvandhoot closed 6 years ago
did you properly configure retry ?
Hi,
Best of my knowledge -
This is how I am creating the client.
EtcdNettyConfig config = new EtcdNettyConfig(); config.setConnectTimeout(10); EtcdNettyClient nettyClient = new EtcdNettyClient(config, URI.create(etcduri)); etcdClient = new EtcdClient(nettyClient);
and
get request -
// get the ResponsePromise // get the value from ResponsePromise EtcdKeyGetRequest getRequest = client.get(key).timeout(1, TimeUnit.SECONDS); try{ return getRequest.send(); }catch(IOException e){ try{ // Retry again once return getRequest.send(); }catch(IOException e1){ throw e1; }catch(Exception e1){ throw e1; } }catch(Exception e){ throw e; }
put request -
// put the key-value
EtcdResponsePromise
Regards, Sarvan
On Fri, Aug 10, 2018 at 2:50 PM Luca Burgazzoli notifications@github.com wrote:
did you properly configure retry ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jurmous/etcd4j/issues/179#issuecomment-412027839, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeVgwvOV1FAvy8-RjN8Lc6vM6vBMO78ks5uPVBogaJpZM4V33Qw .
Hi,
Is it necessary to use the retry for the timeout process.
Thanks its working now.
yes it is, by default it retries indefinitively
In case if ETCD is down connection is not getting timed out.
I have used both put and get API and it waits for indefinite time for making the timeout.
I have used the version 2.15.0 and 2.16.0
Please suggest.
-Sarvan