Reduce/enhance logging in AbstractLeader 66/16366/1
authorTom Pantelis <tpanteli@brocade.com>
Wed, 11 Mar 2015 22:31:25 +0000 (18:31 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 11 Mar 2015 22:31:25 +0000 (18:31 -0400)
If you turn on debug logging for Shard, the "Checking sendAppendEntries
for follower..." message is logged by sendUpdatesToFollower on every
AppendEntriesReply heartbeat even when no data was sent to the follower.
This bombards the karaf.log. To avoid this, we need this only logged if
something changed for the follower. So, I changed the FollwerLogInformation
setMatchIndex and setNextIndex methods to return a boolean if changed
which handleAppendEntriesReply checks to see if either were updated. If
neither changed, it passes true to sendUpdatesToFollower for isHeartbeat
so the message isn't logged.

I also made a few other minor logging changes.

Change-Id: Ib1f2109092b3656c3cc3dfdd2cd7b4641a3f890b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found