Bug 2787: Batch AppendEntries to speed up follower sync
AbstractLeader#sendUpdatesToFollower now attempts to send all entries
to the follower to catch it up with 1 AppendEntries message. However, we
don't want to send too large a message and risk exceeding akka's message
size limit. So I added another param, maxDataSize, to
ReplicatedLog#getFrom. It will attempt to add all entries up to
maxEntries but stops if the accumulated data size exceeds maxDataSize.
For maxDataSize, I reused the existing snapshotChunkSize (default 2M)
defined in ConfigParams. This currently is hard-coded - we may want to
make this configurable.
Change-Id: Ib2c1165c4140a36f4eada8f81b4261260615dd18
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit
6065ba82c90e366919a1b78105507b935b91af8e)