On Sun, Dec 19, 2021 at 6:09 AM Ilya Maximets <[email protected]> wrote:
>
> 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.")
> Signed-off-by: Ilya Maximets <[email protected]>
> ---
>  lib/ovsdb-cs.c | 3 +--
>  1 file changed, 1 insertion(+), 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");
> --
> 2.31.1
>

Thanks Ilya.
Acked-by: Han Zhou <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to