summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2021-12-19 15:09:37 +0100
committerIlya Maximets <i.maximets@ovn.org>2022-01-28 23:44:45 +0100
commit3a05c63702a58c0e1482d6ba83099c8443cb89cd (patch)
tree6832d4e7c594b2fa4efd6a0aa6e05183808dda4c
parentdadd8357f22464232a071fe813c5f6950a5c680c (diff)
downloadopenvswitch-3a05c63702a58c0e1482d6ba83099c8443cb89cd.tar.gz
ovsdb-cs: Fix ignoring of the last id from the initial monitor reply.
Current code doesn't use the last id received in the monitor reply. That may result in re-downloading the database content if the re-connection happened after receiving the initial monitor reply, but before receiving any other database updates. Fixes: 1c337c43ac1c ("ovsdb-idl: Break into two layers.") Reported-at: https://bugzilla.redhat.com/2044624 Acked-by: Mike Pattrick <mkp@redhat.com> Acked-by: Han Zhou <hzhou@ovn.org> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--lib/ovsdb-cs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ovsdb-cs.c b/lib/ovsdb-cs.c
index fcb6fe1b3..2d2b77026 100644
--- a/lib/ovsdb-cs.c
+++ b/lib/ovsdb-cs.c
@@ -1539,12 +1539,11 @@ ovsdb_cs_db_parse_monitor_reply(struct ovsdb_cs_db *db,
const struct json *table_updates;
bool clear;
if (version == 3) {
- struct uuid last_id;
if (result->type != JSON_ARRAY || result->array.n != 3
|| (result->array.elems[0]->type != JSON_TRUE &&
result->array.elems[0]->type != JSON_FALSE)
|| result->array.elems[1]->type != JSON_STRING
- || !uuid_from_string(&last_id,
+ || !uuid_from_string(&db->last_id,
json_string(result->array.elems[1]))) {
struct ovsdb_error *error = ovsdb_syntax_error(
result, NULL, "bad monitor_cond_since reply format");