2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovsdb-idl: Mark arc sources as updated when destination is deleted.

Considering two DB rows, 'a' from table A and 'b' from table B (with
column 'ref_a' a reference to table A):
a = {A._uuid=<U1>}
b = {B._uuid=<U2>, B.ref_a=<U1>}

When the IDL client processes an update that deletes row 'a', row 'b'
is also marked as 'updated' if change tracking is enabled for table B.

Fixes: 102781cc02 ("ovsdb-idl: Track changes for table references.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Han Zhou <hzhou@ovn.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Dumitru Ceara
2021-03-24 10:33:40 +01:00
committed by Ilya Maximets
parent 95689f1668
commit ac85cdb38c
2 changed files with 5 additions and 0 deletions

View File

@@ -198,6 +198,8 @@ static void ovsdb_idl_remove_from_indexes(const struct ovsdb_idl_row *);
static int ovsdb_idl_try_commit_loop_txn(struct ovsdb_idl_loop *loop,
bool *may_need_wakeup);
static void add_tracked_change_for_references(struct ovsdb_idl_row *);
/* Creates and returns a connection to database 'remote', which should be in a
* form acceptable to jsonrpc_session_open(). The connection will maintain an
* in-memory replica of the remote database whose schema is described by
@@ -1385,6 +1387,7 @@ ovsdb_idl_reparse_deleted(struct ovsdb_idl *db)
LIST_FOR_EACH_SAFE (row, next, track_node, &db->deleted_untracked_rows) {
ovsdb_idl_row_untrack_change(row);
add_tracked_change_for_references(row);
ovsdb_idl_row_reparse_backrefs(row);
/* Orphan rows that are still unreferenced or are part of tables that