[ovs-dev] [PATCH 1/3] ovsdb: Fix one off error in tracking monitor changes
Andy Zhou
azhou at ovn.org
Mon Feb 22 09:06:32 UTC 2016
dbmon's changes should be stored with the new transaction number,
rather than the current transaction number.
Signed-off-by: Andy Zhou <azhou at ovn.org>
---
ovsdb/monitor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c
index 5ae9cdb..ef96ca2 100644
--- a/ovsdb/monitor.c
+++ b/ovsdb/monitor.c
@@ -1121,11 +1121,13 @@ ovsdb_monitor_commit(struct ovsdb_replica *replica,
struct ovsdb_monitor_aux aux;
ovsdb_monitor_init_aux(&aux, m);
+ /* Update ovsdb_monitor's transaction number for
+ * each transaction, before calling ovsdb_monitor_change_cb(). */
+ m->n_transactions++;
ovsdb_txn_for_each_change(txn, ovsdb_monitor_change_cb, &aux);
if (aux.efficacy == OVSDB_CHANGES_REQUIRE_EXTERNAL_UPDATE) {
ovsdb_monitor_json_cache_flush(m);
- m->n_transactions++;
}
return NULL;
--
1.9.1
More information about the dev
mailing list