ovsdb-idl: Suppress "delete" operations for garbage-collected tables.
authorBen Pfaff <blp@nicira.com>
Tue, 12 Apr 2011 18:31:58 +0000 (11:31 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 29 Apr 2011 21:31:50 +0000 (14:31 -0700)
commit9bc9a30b991f628bade1e7ddea60eded6dcdadb7
tree4594d087b72c605f26cdb370ac395a3d91a1b9ee
parent565556847b764ae3ebdebab3ee2cf3d8f44667a2
ovsdb-idl: Suppress "delete" operations for garbage-collected tables.

Deciding what delete operations to issue on garbage-collected tables has
been a bit of a difficult issue for ovs-vsctl.  When garbage collection was
introduced in commit c5f341a "ovsdb: Implement garbage collection",
ovs-vsctl did not issue any deletions for these tables at all.  As a side
effect, ovs-vsctl did not notice that records were going to be deleted.
That meant that when multiple commands were issued in one ovs-vsctl run,
ovs-vsctl could get confused by apparent duplicate records that did not
in fact exist.  Commit 28a14bf "ovs-vsctl: Back out garbage collection
changes" fixed the problem by putting all of the explicit deletions back
into ovs-vsctl.

However, adding these explicit deletions had the price that it then became
(again) impossible to use ovs-vsctl commands to delete duplicates, for
example to use "ovs-vsctl del-br" to delete a bridge that points to the
same Port records that some other Bridge record also does.  This commit
makes that possible again, by implementing a compromise:

    * Internally, ovs-vsctl deletes the records that it believes should be
      deleted.

    * ovsdb-idl suppresses the deletions when it makes the RPC call into
      the database server.

Bug #5358.
Reported-by: Henrik Amren <henrik@nicira.com>
lib/ovsdb-idl.c
utilities/ovs-vsctl.8.in