diff mbox series

[ovs-dev,3/6] python: idl: Fix expected cond_seqno when conditions are in flight.

Message ID 20260826043433.1832409-4-twilson@redhat.com
State New
Headers show
Series python: Backport C fixes that never made it. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success

Commit Message

Terry Wilson Aug. 26, 2026, 4:34 a.m. UTC
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 <noreply@anthropic.com>
Signed-off-by: Terry Wilson <twilson@redhat.com>
---
 python/ovs/db/idl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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