Looks Good. On Tue, Mar 1, 2011 at 2:19 PM, Ben Pfaff <[email protected]> wrote: > The check for uncreated symbols does not rely on anything that happens > during transaction commit, so there is no point in allowing the transaction > to be sent to the database server, only to fail there, before reporting > the problem locally. > --- > utilities/ovs-vsctl.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c > index 4435f41..5de5f92 100644 > --- a/utilities/ovs-vsctl.c > +++ b/utilities/ovs-vsctl.c > @@ -3395,6 +3395,12 @@ do_vsctl(const char *args, struct vsctl_command > *commands, size_t n_commands, > } > } > > + unused = ovsdb_symbol_table_find_unused(symtab); > + if (unused) { > + vsctl_fatal("row id \"%s\" is referenced but never created (e.g. " > + "with \"-- --id=%s create ...\")", unused, unused); > + } > + > status = ovsdb_idl_txn_commit_block(txn); > if (wait_for_reload && status == TXN_SUCCESS) { > next_cfg = ovsdb_idl_txn_get_increment_new_value(txn); > @@ -3414,12 +3420,6 @@ do_vsctl(const char *args, struct vsctl_command > *commands, size_t n_commands, > ovsdb_idl_txn_destroy(txn); > txn = the_idl_txn = NULL; > > - unused = ovsdb_symbol_table_find_unused(symtab); > - if (unused) { > - vsctl_fatal("row id \"%s\" is referenced but never created (e.g. " > - "with \"-- --id=%s create ...\")", unused, unused); > - } > - > switch (status) { > case TXN_INCOMPLETE: > NOT_REACHED(); > -- > 1.7.1 > > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev_openvswitch.org >
_______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
