mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ovsdb-idl: Wake up ovsdb_idl_loop when a transaction commits.
There is a fair amount of code that defers modifying the database when a transaction cannot be created (because there is already one outstanding). This code tends to assume that the main loop will wake up again when it becomes possible again to modify the database, but the actual ovsdb_id_loop implementation only did this if the database had changed. This is too conservative a policy and may account for some failures I've seen in tests. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
This commit is contained in:
@@ -3712,13 +3712,10 @@ ovsdb_idl_loop_commit_and_wait(struct ovsdb_idl_loop *loop)
|
||||
break;
|
||||
|
||||
case TXN_SUCCESS:
|
||||
/* If the database has already changed since we started the
|
||||
* commit, re-evaluate it immediately to avoid missing a change
|
||||
* for a while. */
|
||||
/* Possibly some work on the database was deferred because no
|
||||
* further transaction could proceed. Wake up again. */
|
||||
loop->cur_cfg = loop->next_cfg;
|
||||
if (ovsdb_idl_get_seqno(loop->idl) != loop->precommit_seqno) {
|
||||
poll_immediate_wake();
|
||||
}
|
||||
poll_immediate_wake();
|
||||
break;
|
||||
|
||||
case TXN_UNCHANGED:
|
||||
|
Reference in New Issue
Block a user