Update the timeouts to obtain locks to account GC pauses. 72/88372/1
authorNishchya Gupta <nishchyag@altencalsoftlabs.com>
Mon, 9 Mar 2020 10:13:53 +0000 (15:43 +0530)
committerNishchya Gupta <nishchyag@altencalsoftlabs.com>
Mon, 9 Mar 2020 10:26:25 +0000 (15:56 +0530)
It has been observed in scale setup testing that GC Pause on CSC can
go upto 8 seconds.  In order to make L3VPN reliably work under
such circumstances, we have updated the lock-wait-times for
subnetroute engine and the vrfengine to 9 seconds via this fix.

Signed-off-by: Nishchya Gupta <nishchyag@altencalsoftlabs.com>
Change-Id: Ib63f2fe205e968e71c1779e12cb2391875f2ff2f

fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/NexthopManager.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnUtil.java

index cd6f51460915407c7ba8f3f3db2ff1bc2009fdf8..fb001c31f442dbd4df3a783e8223c68643c562de 100644 (file)
@@ -149,7 +149,9 @@ public class NexthopManager implements AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(NexthopManager.class);
     private static final String NEXTHOP_ID_POOL_NAME = "nextHopPointerPool";
     private static final long WAIT_TIME_FOR_SYNC_INSTALL = Long.getLong("wait.time.sync.install", 300L);
-    private static final long WAIT_TIME_TO_ACQUIRE_LOCK = 3000L;
+    //  We set the total wait time for lock to be obtained at 9 seconds since GC pauses can be upto 8 seconds
+    //in scale setups.
+    private static final long WAIT_TIME_TO_ACQUIRE_LOCK = 9000L;
     private static final int SELECT_GROUP_WEIGHT = 1;
     private static final int RETRY_COUNT = 6;
 
index 484d8a647f39f6214764bb92063e6ebc20d70083..92a2bb6c000e6c8a060f3ccb46fce6556639b962 100644 (file)
@@ -1316,8 +1316,10 @@ public final class VpnUtil {
     }
 
     void lockSubnet(String subnetId) {
+        //  We set the total wait time for lock to be obtained at 9 seconds since GC pauses can be upto 8 seconds
+        //in scale setups.
         TryLockInput input =
-            new TryLockInputBuilder().setLockName(subnetId).setTime(3000L).setTimeUnit(TimeUnits.Milliseconds).build();
+            new TryLockInputBuilder().setLockName(subnetId).setTime(9000L).setTimeUnit(TimeUnits.Milliseconds).build();
         Future<RpcResult<TryLockOutput>> result = lockManager.tryLock(input);
         try {
             if (result != null && result.get().isSuccessful()) {