Skip to content

Commit

Permalink
refactor link tracing code
Browse files Browse the repository at this point in the history
  • Loading branch information
ironage committed Aug 31, 2022
1 parent 21f67ac commit 0634e94
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 194 deletions.
2 changes: 2 additions & 0 deletions src/realm/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ void Lst<ObjKey>::do_clear()
target_obj.remove_one_backlink(backlink_col, m_obj.get_key()); // Throws
size_t num_remaining = target_obj.get_backlink_count(*origin_table, m_col_key);
if (num_remaining == 0) {
// embedded objects should only have one incoming link
REALM_ASSERT_EX(target_obj.get_backlink_count() == 0, target_obj.get_backlink_count());
state.m_to_be_deleted.emplace_back(target_table_key, target_key);
}
}
Expand Down
Loading

0 comments on commit 0634e94

Please sign in to comment.