[ovs-dev] [Simple DB Stats 07/11] ovs-vswitchd: Allow bridge code to manage the database connection itself.
blp at nicira.com
Wed Jun 23 10:32:04 PDT 2010
On Tue, Jun 22, 2010 at 03:54:04PM -0700, Justin Pettit wrote:
> On Jun 10, 2010, at 5:14 PM, Ben Pfaff wrote:
> > + ovsrec_open_vswitch_set_cur_cfg(cfg, cfg->next_cfg);
> > + ovsdb_idl_txn_commit(txn);
> > + ovsdb_idl_txn_destroy(txn); /* XXX */
> What's the reason for the "XXX"? I know that it existed in the
> previous code, but it's not exactly confidence inspiring. :-)
It's really just a matter of error checking. It might be nicer to wait
for the commit to finish (as part of the state machine) and retry it
immediately if it failed. But the various reasons that transactions can
fail are covered:
- This transaction currently doesn't race with any others, so it
shouldn't fail for that reason.
- If the connection to ovsdb-server is lost, then we'll
reconfigure when it reconnects, which will hit this path
again, so that's fine.
- The only other reason is bugs in the ovs-vswitchd IDL code or
in ovsdb-server, and we know that those are pretty good code
due to the 500 or so unit tests that test it.
So basically we can do better but there are probably other bits of code
that need the attention more.
More information about the dev