X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbehaviors%2FLeader.java;h=234f9db664e4d43e833e4e354e3d3045094dd381;hb=971b179000ef1cc56699de35061cf6f97d4cf36f;hp=8b95e8b7a6bd57e9581d02226f99b2d44bf5cb51;hpb=62ee81f764eef592f00e67181b4dbedb3f734de6;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java index 8b95e8b7a6..234f9db664 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java @@ -120,7 +120,7 @@ public class Leader extends AbstractRaftActorBehavior { @Override protected RaftState handleAppendEntries(ActorRef sender, AppendEntries appendEntries) { - context.getLogger().info("Leader: Received {}", appendEntries.toString()); + context.getLogger().debug(appendEntries.toString()); return state(); } @@ -130,7 +130,7 @@ public class Leader extends AbstractRaftActorBehavior { if(! appendEntriesReply.isSuccess()) { context.getLogger() - .info("Leader: Received {}", appendEntriesReply.toString()); + .debug(appendEntriesReply.toString()); } // Update the FollowerLogInformation @@ -294,12 +294,7 @@ public class Leader extends AbstractRaftActorBehavior { List entries = Collections.emptyList(); if (context.getReplicatedLog().isPresent(nextIndex)) { - // TODO: Instead of sending all entries from nextIndex - // only send a fixed number of entries to each follower - // This is to avoid the situation where there are a lot of - // entries to install for a fresh follower or to a follower - // that has fallen too far behind with the log but yet is not - // eligible to receive a snapshot + // FIXME : Sending one entry at a time entries = context.getReplicatedLog().getFrom(nextIndex, 1); }