For the series, looks good by my eyes. I have to admit I may have just skimmed patch 8 though :)

Acked-by: Mark Michelson <[email protected]>

On 11/15/2018 01:05 AM, Ben Pfaff wrote:
Until now the code here would happily try to send transactions to the
database server even if the database connection was not in the correct
state.  In some cases this could lead to strange behavior, such as sending
a database transaction for a database that the IDL had just learned did not
exist on the server.

Signed-off-by: Ben Pfaff <[email protected]>
---
  lib/ovsdb-idl.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 9f44cefd152b..a1f246d6f7b7 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -3867,6 +3867,13 @@ ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn)
          goto coverage_out;
      }
+ /* If we're still connecting or re-connecting, don't bother sending a
+     * transaction. */
+    if (txn->db->idl->state != IDL_S_MONITORING) {
+        txn->status = TXN_TRY_AGAIN;
+        goto disassemble_out;
+    }
+
      /* If we need a lock but don't have it, give up quickly. */
      if (txn->db->lock_name && !txn->db->has_lock) {
          txn->status = TXN_NOT_LOCKED;


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

Reply via email to