2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovsdb-cs: Consider default conditions implicitly acked.

When initializing a monitor table the default monitor condition is
[True] which matches the behavior of the server (to send all rows of
that table).  There's no need to include this default condition in the
initial monitor request so we can consider it implicitly acked by the
server.

This fixes the incorrect (one too large) expected condition sequence
number reported by ovsdb_idl_set_condition() when application is
trying to set a [True] condition for a new table.

Reported-by: Numan Siddique <numans@ovn.org>
Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Dumitru Ceara
2022-12-13 18:11:18 +01:00
committed by Ilya Maximets
parent 739bcf2263
commit a787fbbf9d
5 changed files with 133 additions and 53 deletions

View File

@@ -85,9 +85,9 @@ class Monitor(enum.IntEnum):
class ConditionState(object):
def __init__(self):
self._ack_cond = None
self._ack_cond = [True]
self._req_cond = None
self._new_cond = [True]
self._new_cond = None
def __iter__(self):
return iter([self._new_cond, self._req_cond, self._ack_cond])