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 <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
}
if (datum->n != orig_n) {
}
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) {
bitmap_set1(txn_row->changed, column->index);
ovsdb_datum_sort_assert(datum, column->type.key.type);
if (datum->n < column->type.n_min) {
row,action,a,a2a,a2a1,a2b,_version
<0>,delete,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
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>""]"
]])
,new,1,"[""set"",[]]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<5>""]"
]])