ovsdb: Simplify referential integrity checking commit logic.
authorBen Pfaff <blp@nicira.com>
Fri, 12 Mar 2010 19:03:44 +0000 (11:03 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 17 Mar 2010 21:24:55 +0000 (14:24 -0700)
commitc7d85e0df048a9fda6e1a111cd74e5a82e6b3b91
tree929398c4f26173222c145efc87a4f4c14782c696
parent3e010b7a56dc293239e0ea135600b456b078ab5b
ovsdb: Simplify referential integrity checking commit logic.

Until now, the commit-time logic for verifying referential integrity
modified row reference counts in-place.  That meant that it had to be
careful to be able to roll back those changes if it did detect a violation.
This commit changes the logic to avoid making any in-place changes.
Instead, the reference counts are tracked outside the rows themselves and
committed only if the transaction as a whole satisfies the constraints.
This eliminates a fair bit of code and paves the way for implementing
weak references as well.
ovsdb/transaction.c