Add specific serializer for SimpleReplicatedLogEntry
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActor.java
index 967a8fb9b3c0c0fd40e6b0251d6adf93ddfe5493..6cbeda6098d2026225767d1564aae76109a1fa00 100755 (executable)
@@ -277,7 +277,7 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
             // non-leader cannot satisfy leadership request
             LOG.warn("{}: onRequestLeadership {} was sent to non-leader."
                     + " Current behavior: {}. Sending failure response",
-                    persistenceId(), getCurrentBehavior().state());
+                    persistenceId(), message, getCurrentBehavior().state());
             message.getReplyTo().tell(new LeadershipTransferFailedException("Cannot transfer leader to "
                     + message.getRequestedFollowerId()
                     + ". RequestLeadership message was sent to non-leader " + persistenceId()), getSelf());
@@ -484,7 +484,8 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
             for (String id: followerIds) {
                 final FollowerLogInformation info = leader.getFollower(id);
                 followerInfoList.add(new FollowerInfo(id, info.getNextIndex(), info.getMatchIndex(),
-                        info.isFollowerActive(), DurationFormatUtils.formatDurationHMS(info.timeSinceLastActivity()),
+                        info.isFollowerActive(), DurationFormatUtils.formatDurationHMS(
+                            TimeUnit.NANOSECONDS.toMillis(info.nanosSinceLastActivity())),
                         context.getPeerInfo(info.getId()).isVoting()));
             }