On 31 Jan 2026, at 2:32, Ilya Maximets wrote:

> If a server that doesn't have an up-to-date log attempts a pre-vote,
> it is possible that it will be granted.  This can happen when the
> request is not considered disruptive (sufficient time have passed
> since the last message seen) because the current code doesn't check
> the log length if the receiver already voted for any other server on
> the current term.
>
> This is not good, as the pre-vote supposed to determine if the
> requester can win elections on the next term, and it can not if its
> log is not up-to-date.
>
> In general, the current vote has no meaning for the next term.  At the
> beginning of the next term the vote will be set to zero in any case,
> so the only thing we should be checking is the log being up-to-date.
>
> The test for a disruptive server with an outdated log reproduces the
> issue, so it was extended to make sure the outdated server never wins
> the pre-vote.
>
> Fixes: 85634fd58004 ("ovsdb: raft: Support pre-vote mechanism to deal with 
> disruptive server.")
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-dev/2026-January/428993.html
> Reported-by: Han Zhou <[email protected]>
> Signed-off-by: Ilya Maximets <[email protected]>

Thanks for the patch, Ilya.

Going over the logic, this change makes sense to me. As I’m not too familiar 
with the overall code, it still would be good to get a review from Han.

Acked-by: Eelco Chaudron <[email protected]>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to