When set_condition() queues a new condition while other tables already
have conditions in flight, it must return a sequence number that accounts
for those in-flight requests.  The check for "any table has a requested
condition" referenced the bound method t.condition_state.request instead
of the .requested property, so the expression was always truthy and the
returned expected seqno could be one too high.

Test against the .requested property (the in-flight condition slot) being
populated instead.

Assisted-by: Claude Opus 4.8 <[email protected]>
Signed-off-by: Terry Wilson <[email protected]>
---
 python/ovs/db/idl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index 417e8c020..0a7478e9f 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -708,7 +708,7 @@ class Idl(object):
         # New condition will be sent out after all already requested ones
         # are acked.
         if table.condition_state.new:
-            any_reqs = any(t.condition_state.request
+            any_reqs = any(t.condition_state.requested is not None
                            for t in self.tables.values())
             return self.cond_seqno + int(any_reqs) + 1
 
-- 
2.49.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to