Bug 7319: thread.sleep in group installation 99/49099/6
authorTomer <tomer.pearl@hpe.com>
Wed, 7 Dec 2016 17:00:13 +0000 (19:00 +0200)
committerAlon Kochba <alonko@hpe.com>
Sun, 11 Dec 2016 09:02:02 +0000 (09:02 +0000)
Full BC group installation delay is at least 300ms times number of DPNS in the ELAN.
This has devastating effects in scale setups, which is described in the bug ticket.

Moving the sleep outside of the loop.

Change-Id: I6d0f20a7b9c196fc7118b8d579c53013d4f5cce6
Signed-off-by: Tomer <tomer.pearl@hpe.com>
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java

index fc9ab9bbd7fcf242f699e0d1d003de69a0222ba2..8b41e8d3ea44ed2bb19f26ccc5e704df04f23e36 100644 (file)
@@ -927,14 +927,13 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
                             MDSALUtil.buildBucketLists(remoteListBucketInfo));
                     mdsalManager.syncInstallGroup(dpnInterface.getDpId(), group,
                             ElanConstants.DELAY_TIME_IN_MILLISECOND);
-                    try {
-                        Thread.sleep(WAIT_TIME_FOR_SYNC_INSTALL);
-                    } catch (InterruptedException e1) {
-                        LOG.warn("Error while waiting for remote BC group on other DPNs for ELAN {} to install",
-                                elanInfo);
-                    }
                 }
             }
+            try {
+                Thread.sleep(WAIT_TIME_FOR_SYNC_INSTALL);
+            } catch (InterruptedException e1) {
+                LOG.warn("Error while waiting for remote BC group on other DPNs for ELAN {} to install", elanInfo);
+            }
         }
     }