diff mbox

[ovs-dev,1/1] python: Fix logic resulting in too many unexpected replies Fix logic resulting in too many unexpected replies

Message ID 20170217172746.24186-1-twilson@redhat.com
State Accepted
Delegated to: Russell Bryant
Headers show

Commit Message

Terry Wilson Feb. 17, 2017, 5:27 p.m. UTC
Since __txn_process_reply always returns None, the existing code
will always hit the final else for replies and log a debug message
about receiving an unexpected reply. In the C version,
ovsdb_idl_txn_process_reply returns true any time the txn is found,
so that behavior is duplicated here.

Signed-off-by: Terry Wilson <twilson@redhat.com>
---
 python/ovs/db/idl.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Russell Bryant Feb. 17, 2017, 8:53 p.m. UTC | #1
On Fri, Feb 17, 2017 at 12:27 PM, Terry Wilson <twilson@redhat.com> wrote:

> Since __txn_process_reply always returns None, the existing code
> will always hit the final else for replies and log a debug message
> about receiving an unexpected reply. In the C version,
> ovsdb_idl_txn_process_reply returns true any time the txn is found,
> so that behavior is duplicated here.
>
> Signed-off-by: Terry Wilson <twilson@redhat.com>
> ---
>  python/ovs/db/idl.py | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks for the patch.  I fixed up the first line of the commit message and
then applied this to master, branch-2.7, and branch-2.6.
diff mbox

Patch

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index e43457c..b7b5e1c 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -649,6 +649,7 @@  class Idl(object):
         txn = self._outstanding_txns.pop(msg.id, None)
         if txn:
             txn._process_reply(msg)
+            return True
 
 
 def _uuid_to_row(atom, base):