// probing backwards, only send one entry as a probe, as
// soon as we have a successful call forwards will become
// true and we can catch up quickly
GetEntriesResult result = log.getEntriesFrom(nextIndex, forwards ? BATCH_SIZE : 1);
final AppendEntries request = AppendEntries.newBuilder()
.setTerm(log.currentTerm())
.setLeaderId(log.self().toString())
.setPrevLogIndex(result.lastLogIndex())
.setPrevLogTerm(result.lastLogTerm())
.setCommitIndex(log.commitIndex())