On 1/25/22 02:34, Han Zhou wrote: > > > On Sun, Dec 19, 2021 at 6:09 AM Ilya Maximets <[email protected] > <mailto:[email protected]>> wrote: >> >> If a single transaction exceeds the size of the whole database (e.g., >> a lot of rows got removed and new ones added), transaction history will >> be drained. This leads to sending UUID_ZERO to the clients as the last >> transaction id in the next monitor update, because monitor doesn't >> know what was the actual last transaction id. In case of a re-connect >> that will cause re-downloading of the whole database, since the >> client's last_id will be out of sync. >> >> One solution would be to store the last transaction ID separately >> from the actual transactions, but that will require a careful >> management in cases where database gets reset and the history needs >> to be cleared. Keeping the one last transaction instead to avoid >> the problem. That should not be a big concern in terms of memory >> consumption, because this last transaction will be removed from the >> history once the next transaction appeared. This is also not a concern >> for a fast re-sync, because this last transaction will not be used >> for the monitor reply; it's either client already has it, so no need >> to send, or it's a history miss. >> >> The test updated to not check the number of atoms if there is only >> one transaction in the history. >> >> Fixes: 317b1bfd7dd3 ("ovsdb: Don't let transaction history grow larger than >> the database.") >> Signed-off-by: Ilya Maximets <[email protected] <mailto:[email protected]>> >> --- >> ovsdb/transaction.c | 6 ++++-- >> tests/ovsdb-server.at <http://ovsdb-server.at> | 16 +++++++++------- >> 2 files changed, 13 insertions(+), 9 deletions(-) >> >> > > Acked-by: Han Zhou <[email protected] <mailto:[email protected]>>
Thanks, Han and Mike! Applied and backported to branch-2.17. Bets regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
