When a row was deleted, and that caused the transaction manager to remove a remaining weak reference to the row, and no other change had been made to the row in that transaction, and a client was monitoring modifications of the _version column in the row, then the monitor update for the column did not include the old contents of the _version column, even though it should have. This commit fixes the problem.
Probably most clients only look at the new value of the column, if they monitor _version at all, and this bug is really old, so it's probably not a serious bug. Found by inspection. Signed-off-by: Ben Pfaff <[email protected]> --- ovsdb/transaction.c | 1 + tests/ovsdb-monitor.at | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c index 98a7a3f..be40df9 100644 --- a/ovsdb/transaction.c +++ b/ovsdb/transaction.c @@ -533,6 +533,7 @@ assess_weak_refs(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row) } if (datum->n != orig_n) { + bitmap_set1(txn_row->changed, OVSDB_COL_VERSION); bitmap_set1(txn_row->changed, column->index); ovsdb_datum_sort_assert(datum, column->type.key.type); if (datum->n < column->type.n_min) { diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at index df0157a..d24ae91 100644 --- a/tests/ovsdb-monitor.at +++ b/tests/ovsdb-monitor.at @@ -213,7 +213,7 @@ OVSDB_CHECK_MONITOR([monitor weak reference change], row,action,a,a2a,a2a1,a2b,_version <0>,delete,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]" -<3>,old,,"[""uuid"",""<0>""]",,, +<3>,old,,"[""uuid"",""<0>""]",,,"[""uuid"",""<4>""]" ,new,1,"[""set"",[]]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<5>""]" ]]) -- 1.7.10.4 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
