-
Improvement
-
Resolution: Unresolved
-
Low
-
None
-
None
-
None
RAFT section 5.3 states that:
If desired, the protocol can be optimized to reduce the number of rejected AppendEntries RPCs. For example, when rejecting an AppendEntries request, the follower can include the term of the conflicting entry and the first index it stores for that term. With this information, the leader can decrement nextIndex to bypass all of the con- flicting entries in that term; one AppendEntries RPC will be required for each term with conflicting entries, rather than one RPC per entry. In practice, we doubt this opti- mization is necessary, since failures happen infrequently and it is unlikely that there will be many inconsistent en- tries.
We currently do not implement this optimization, but it could be useful. From implementation perspective, rather than expanding AppendEntries directly with this information, we should add a subclass, which is used when the follower determines this additional information is useful for leader to skip some entries.