mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ovsdb-idl: Avoid sending transactions when the DB is not synced up.
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. Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user