Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove backlinks when deleting an objects containing a LnkSet #5398

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Apr 12, 2022

What, How & Why?

Fixes #5387

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)

@jedelbo jedelbo requested review from nicola-cab and ironage April 12, 2022 15:53
@cla-bot cla-bot bot added the cla: yes label Apr 12, 2022
@jedelbo
Copy link
Contributor Author

jedelbo commented Apr 12, 2022

@jsflax This should fix the issue with Set.

Copy link
Member

@nicola-cab nicola-cab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but there is a small thing for the col_type == col_type_Link and col_type == col_type_TypedLink, provided the CI passes

@@ -810,7 +810,7 @@ size_t Cluster::erase(ObjKey key, CascadeState& state)
dict.remove_backlinks(state);
}
}
else if (col_type == col_type_LinkList) {
else if (col_type == col_type_LinkList || col_type == col_type_Link) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly this works, but what's the difference between col_type_Link and col_type_TypedLink

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually support col_type_TypedLink yet, so that is dead code right now. TypedLink is currently only used internally as part of Mixed. The idea is that a column of type col_type_Link or col_type_LinkList can only link to a single static destination type, while a TypedLink has the flexibility to point to any type dynamically because it stores the destination object key and the destination object type. However, the issue in this PR is that LnkLst has type col_type_LinkList while LnkSet has type col_type_Link with the set attribute.

@jedelbo jedelbo merged commit 9bde3dc into master Apr 13, 2022
@jedelbo jedelbo deleted the je/clear-backlinks-from-set branch April 13, 2022 07:59
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants