ovsdb: Fix one off error in tracking monitor changes
authorAndy Zhou <azhou@ovn.org>
Mon, 22 Feb 2016 08:24:06 +0000 (00:24 -0800)
committerAndy Zhou <azhou@ovn.org>
Thu, 25 Feb 2016 00:13:52 +0000 (16:13 -0800)
commitd2c9462c96e6f48b150c03e9191cff53d8e5c307
treee8f15f448326e9b7298f6dd0731466cede136eca
parent5b173228c65b52427710cec7ee47b043a552fc6b
ovsdb: Fix one off error in tracking monitor changes

dbmon's changes should be stored with the next transaction number,
rather than the current transaction number.  This bug causes the
changes of a transaction stored in a monitor to be unnoticed by
the jsonrpc connections that is responsible for flush the monitor
content.

However, the bug was not noticed until it was exposed by a later
optimization patch: "avoid unnecessary call to ovsdb_monitor_get_update()."
The lack of optimization means that the update is still generated
when 'unflushed' equals to n_transactions + 1, which should have
indicated the monitor has been flushed already.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Liran Schour <lirans@il.ibm.com>
Acked-by: Ben Pfaff <blp@ovn.org>
ovsdb/monitor.c