BUG-8618: reconnect connections more aggressively 16/60416/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Jul 2017 17:10:22 +0000 (19:10 +0200)
committerRobert Varga <nite@hq.sk>
Sat, 15 Jul 2017 08:47:57 +0000 (08:47 +0000)
Given that the timeout period on backend for an existing transaction
is 15 seconds, sleeping for 5 seconds between reconnect attempts seems
excessive. Lower the timer to 1 second, which should give us a slightly
better chance to avoid timeouts.

Change-Id: Ib74480f5630865cb7a11ca7027e0495443d1d14e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 70f287502823bab284555b52b91043c3204b829b)

opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorBehavior.java

index 358704524a07451da1e72c26bec9192f2fd71e06..0d55835cd9390ef70374a276fafdc05fc2307e13 100644 (file)
@@ -64,7 +64,7 @@ public abstract class ClientActorBehavior<T extends BackendInfo> extends
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(ClientActorBehavior.class);
-    private static final FiniteDuration RESOLVE_RETRY_DURATION = FiniteDuration.apply(5, TimeUnit.SECONDS);
+    private static final FiniteDuration RESOLVE_RETRY_DURATION = FiniteDuration.apply(1, TimeUnit.SECONDS);
 
     /**
      * Map of connections to the backend. This map is concurrent to allow lookups, but given complex operations