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:41:11 +0200 |
commit | e0aa5e132993303603b5088aa0a79f8beee0960d (patch) | |
tree | 779844a0e20dd012e69a4c1109845644f72fc379 | |
parent | 8da40d31c702e785ab9dd617ae1db842348100f6 (diff) | |
download | openvswitch-e0aa5e132993303603b5088aa0a79f8beee0960d.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>
-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() |