[ovs-dev] [PATCH 03/22] ovn-controller: Avoid blocking to commit OVSDB transactions.

Alex Wang alexw at nicira.com
Sun Jul 26 06:31:48 UTC 2015


On Wed, Jul 22, 2015 at 1:26 PM, Russell Bryant <rbryant at redhat.com> wrote:

> On 07/19/2015 06:44 PM, Ben Pfaff wrote:
> > Until now, ovn-controller has been full of loops that commit a
> transaction
> > to the OVS or OVN Southbound database.  These blocking loops delay other
> > work within ovn-controller.  They also make it unsafe to keep pointers to
> > database records within a single ovn-controller main loop, since calls
> > to ovsdb_idl_run() can cause IDL records to be destroyed.  This commit
> > drops all of the blocking calls, instead doing a single commit to the
> > databases at the end of each main loop.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
>
> This is great!  This is something I've wanted to do for a while but
> never got around to.  Thanks!  The changes look good.  I also did some
> basic testing of this with ovs-sandbox and did not encounter any errors.
>
> Alex, I think it would be great to follow this same pattern for
> ovn-controller-vtep.  The idl_loop struct and related functions could be
> shared between the two, at least.
>


Yeah, I saw quite some changes I need to adopt in my vtep controller
series.  will do that~

Also, could we add 'commit' to function name like
idl_loop_commit_and_wait()?  I just assumed that the idl_loop_wait() just
waits...  but it actually commits as well,

Thanks,
Alex Wang,




>
> Acked-by: Russell Bryant <rbryant at redhat.com>
>
> --
> Russell Bryant
>



More information about the dev mailing list