ovsdb-idl: Optimize out transactions that are complete no-ops.
authorBen Pfaff <blp@nicira.com>
Tue, 14 Jun 2011 22:00:50 +0000 (15:00 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 15 Jun 2011 19:29:50 +0000 (12:29 -0700)
commitc15f1d11fa95a036eaa2504527bbd5decf082db6
treea925b9152b6f3683c64196bd00f5d79996ea35e8
parent05411977195ce5095c8c4a0d4b6472bdad99008e
ovsdb-idl: Optimize out transactions that are complete no-ops.

Commit 1cc618c3252 "ovsdb-idl: Fix atomicity of writes that don't change a
column's value" fixed transactions that write the existing value to
some columns, ensuring that those columns still got written to the database
to avoid making the transaction nonatomic in the presence of writes that do
modify part of the database.

However, that commit was too conservative: we can still optimize out a
database transaction that writes *only* existing values to the database,
because if we drop such a transaction then the resulting database is still
one that could result from executing transactions in a serial order.  This
commit implements that optimization.

As an example of what this commit does, before this commit, an "ovs-vsctl
set" command that specified the existing value for a column would do a
round-trip to the database to write that existing value.  After this
commit, that round-trip would not occur.

Found by observing system startup.
lib/ovsdb-idl.c