diff options
author | Wentao Jia <wentao.jia@easystack.cn> | 2022-03-21 10:32:18 +0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-04-04 21:39:54 +0200 |
commit | e3de0bd82d59fd8f4ccb7370c93d347f7621488f (patch) | |
tree | 86cf89eca2314ce86ea53b863cc40862c4fae041 /python | |
parent | 0027b3b46c759b65df9533b52166da7bbf3b96a1 (diff) | |
download | openvswitch-e3de0bd82d59fd8f4ccb7370c93d347f7621488f.tar.gz |
python: idl: Set cond_changed to false if last id is zero.
After reconnection, cond_changed will be set to true, poll will be
called and never block causing cpu high load forever.
Fixes: 46d44cf3be0d ("python: idl: Add monitor_cond_since support.")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Wentao Jia <wentao.jia@easystack.cn>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/db/idl.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 4ecdcaa19..166fa38e6 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -356,6 +356,9 @@ class Idl(object): flushing the local cached DB contents. """ ack_all = self.last_id == str(uuid.UUID(int=0)) + if ack_all: + self.cond_changed = False + for table in self.tables.values(): if ack_all: table.condition.request() |