ovn-controller: Avoid blocking to commit OVSDB transactions.
authorBen Pfaff <blp@nicira.com>
Sun, 19 Jul 2015 17:56:57 +0000 (10:56 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 28 Jul 2015 18:06:47 +0000 (11:06 -0700)
commitf1fd7657339abf6da99f878e863b31a295f7fbd9
tree5ad9824daf14b327fb71243c060cb608a185cb63
parentacd55f58a54ebd0d5352e41b5dfb39cb740b5688
ovn-controller: Avoid blocking to commit OVSDB transactions.

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@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
ovn/controller/binding.c
ovn/controller/binding.h
ovn/controller/chassis.c
ovn/controller/chassis.h
ovn/controller/ovn-controller.c
ovn/controller/ovn-controller.h