diff mbox series

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

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

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_FreeBSD_Build_and_Test success github build: passed

Commit Message

Terry Wilson Sept. 22, 2026, 8:31 p.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
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 ce2cbc5eb..342fa487c 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