Bug 8446 - Increase timeout in leadership transfer 79/57679/3
authorJakub Morvay <jmorvay@cisco.com>
Tue, 23 May 2017 12:06:48 +0000 (14:06 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 4 Jun 2017 07:47:42 +0000 (09:47 +0200)
Change-Id: Iffd66ef2c771b797b236f23c39b1fb87b5a27c89
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
(cherry picked from commit ea6ba66600c4f2f143cbb13279ded184ce6d3fcc)

opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java

index 9ee4c73..45e497d 100644 (file)
@@ -78,7 +78,7 @@ public class RaftActorLeadershipTransferCohort {
         final long electionTimeout = raftActor.getRaftActorContext().getConfigParams()
                 .getElectionTimeOutInterval().toMillis();
         final int variance = raftActor.getRaftActorContext().getConfigParams().getElectionTimeVariance();
-        newLeaderTimeoutInMillis = electionTimeout + variance * 2;
+        newLeaderTimeoutInMillis = 2 * (electionTimeout + variance);
     }
 
     void init() {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.