]> git.proxmox.com Git - mirror_ovs.git/commit
raft: Fix next_index in install_snapshot reply handling.
authorHan Zhou <hzhou@ovn.org>
Sat, 29 Feb 2020 02:07:10 +0000 (18:07 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 6 Mar 2020 22:25:17 +0000 (14:25 -0800)
commit315e88cb4dd9c524ac111323f9d064678cf06a5e
treea47eed9af02777a6d290a7514a3c39e2113a10d3
parent99c2dc8d04b3b697edfa02b06e127edad6ad5b28
raft: Fix next_index in install_snapshot reply handling.

When a leader handles install_snapshot reply, the next_index for
the follower should be log_start instead of log_end, because there
can be new entries added in leader's log after initiating the
install_snapshot procedure.  Also, it should send all the accumulated
entries to follower in the following append-request message, instead
of sending 0 entries, to speed up the converge.

Without this fix, there is no functional problem, but it takes
uncessary extra rounds of append-requests responsed with "inconsistency"
by follower, although finally will be converged.

Signed-off-by: Han Zhou <hzhou@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovsdb/raft.c