On Fri, Jun 05, 2020 at 02:00:29PM +0530, [email protected] wrote: > From: Numan Siddique <[email protected]> > > The function ovsdb_idl_loop_run(), after calling ovsdb_idl_run(), > returns a transaction object (of type 'struct ovsdb_idl_txn'). > The returned transaction object can be NULL if there is a pending > transaction (loop->committing_txn) in the idl loop object. > > Normally the clients of idl library, first call ovsdb_idl_loop_run(), > then do their own processing and create any idl transactions during > this processing and then finally call ovsdb_idl_loop_commit_and_wait(). > > If ovsdb_idl_loop_run() returns NULL transaction object, then much > of the processing done by the client gets wasted as in the case > of ovn-controller. > > The client (in this case ovn-controller), can skip the processing > and instead call ovsdb_idl_loop_commit_and_wait() if the transaction > oject is NULL. But ovn-controller uses IDL tracking and it may > loose the tracked changes in that run. > > This patch tries to improve this scenario, by checking if the > pending transaction can be committed in the ovsdb_idl_loop_run() > itself and if the pending transaction is cleared (because of the > response messages from ovsdb-server due to a transaction message > in the previous run), ovsdb_idl_loop_run() can return a valid > transaction object. > > CC: Han Zhou <[email protected]> > Signed-off-by: Numan Siddique <[email protected]>
This seems reasonable to me, so I committed it. It would have been nice to have a report on how much difference it made, though. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
