Improve follower term conflict resolution 34/79334/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Jan 2018 16:08:03 +0000 (17:08 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Jan 2019 09:15:59 +0000 (10:15 +0100)
commit2659ea7bb9f51d216c2736a58ad86591380a9527
treea5db9815c4d90e2029979e08df9e17f26898733f
parent3d015d355cda26098cf70ac6f123f437ed8a175c
Improve follower term conflict resolution

Rather than performing a linear search downwards for a matching
log entry, take into account follower's last log index. This
eliminates the need for a lot of round-trips if the follower is
far behind the leader, but does not have a complete common ancestry.

Change-Id: I63c815f108d322de5d438a6eda43aaa7982d820a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/FollowerLogInformationTest.java

©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.