From: Madhu Venugopal Date: Mon, 26 Aug 2013 00:34:05 +0000 (-0700) Subject: Fixing a minor bug in Cache replace code in Connection Manager. X-Git-Tag: releasepom-0.1.0~176 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=d7206c0c4f8288f990efd279b4ad59bc6d5825ee;hp=-c Fixing a minor bug in Cache replace code in Connection Manager. Change-Id: Ic885dc0890860abb23b067458353ba16d21b275b Signed-off-by: Madhu Venugopal --- d7206c0c4f8288f990efd279b4ad59bc6d5825ee diff --git a/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java b/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java index d93f74b4fe..d7c4e5f933 100644 --- a/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java +++ b/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java @@ -237,13 +237,12 @@ public abstract class AbstractScheme { * with this controller to take hold of a Node. */ if (isConnectionAllowed(node)) { - if (!nodeConnections.replace(node, oldControllers, newControllers)) { + if (oldControllers == null || !nodeConnections.replace(node, oldControllers, newControllers)) { clusterServices.trollback(); try { Thread.sleep(100); } catch ( InterruptedException e) {} - log.debug("Replace failed... old={} with new={} for {} to {}", oldControllers.toString(), newControllers.toString(), - controller.getHostAddress(), node.toString()); + log.debug("Retrying ... {} with {}", controller.getHostAddress(), node.toString()); return putNodeToController(node, controller); } else { log.debug("Replace successful old={} with new={} for {} to {}", oldControllers.toString(), newControllers.toString(),