idl: Gracefully handle destroying a transaction before receiving its reply.
authorBen Pfaff <blp@nicira.com>
Fri, 15 Jan 2010 23:22:54 +0000 (15:22 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 15 Jan 2010 23:35:38 +0000 (15:35 -0800)
commitc5a80c70c135a8c71969717cc7c4b06e6e7b715b
treef0616ddc83d186594dec210c1e180f18de10c768
parent88258e0034cc7ca6ffde0974f1fb92d26289ad6a
idl: Gracefully handle destroying a transaction before receiving its reply.

If ovsdb_idl_txn_destroy() is called to destroy a transaction before its
reply has been received from the database server, then until now we would
drop the connection to the database when the reply actually arrived,
because we would have no record of that transaction ID any longer.

Notably, ovs-vswitchd does this: it "fires and forgets" database
transactions.  (Really, it should not do that, but that's a bigger commit.)

This commit fixes the problem by not dropping the database connection in
such a case.

This fixes an observed problem such that sometimes ovs-vsctl took a long
time to complete, which was because ovs-vswitchd was dropping its
connection to the database and backing off.
lib/ovsdb-idl.c