]> git.proxmox.com Git - mirror_ovs.git/commit
raft: Avoid having more than one snapshot in-flight.
authorIlya Maximets <i.maximets@ovn.org>
Tue, 20 Oct 2020 16:22:25 +0000 (18:22 +0200)
committerIlya Maximets <i.maximets@ovn.org>
Tue, 3 Nov 2020 12:01:33 +0000 (13:01 +0100)
commit83fbd2e9dc5d85bee43b7597d4c3b403d4d1c484
tree93cccfe373505ccaf9ae164659428b601376d794
parentf38f98a2c0dd7fcaf20fbe11d1e67a9b2afc0b2a
raft: Avoid having more than one snapshot in-flight.

Previous commit 8c2c503bdb0d ("raft: Avoid sending equal snapshots.")
took a "safe" approach to not send only exactly same snapshot
installation requests.  However, it doesn't make much sense to send
more than one snapshot at a time.  If obsolete snapshot installed,
leader will re-send the most recent one.

With this change leader will have only 1 snapshot in-flight per
connection.  This will reduce backlogs on raft connections in case
new snapshot created while 'install_snapshot_request' is in progress
or if election timer changed in that period.

Also, not tracking the exact 'install_snapshot_request' we've sent
allows to simplify the code.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1888829
Fixes: 8c2c503bdb0d ("raft: Avoid sending equal snapshots.")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
ovsdb/raft-private.c
ovsdb/raft-private.h
ovsdb/raft.c