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

Add constraint verification update only on necessary actions #1341

Merged

Conversation

Josipmrden
Copy link
Contributor

@Josipmrden Josipmrden commented Oct 9, 2023

Constraints are always verified in memgraph, even if edges are being added into the database only as a modification. Therefore, appropriate flag is being set in the transaction if constraints really need to be modified.

[master < Task] PR

  • Check, and update documentation if necessary
  • Provide the full content or a guide for the final git message

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses
  • Tag someone from docs team in the comments

@vpavicic : Optimized verification of unique and existence constraints. Constraints are now not verified on nodes if exactly the properties that are triggering change in unique constraint indexes are updated.

@Josipmrden Josipmrden self-assigned this Oct 9, 2023
@Josipmrden Josipmrden added the feature feature label Oct 9, 2023
@Josipmrden Josipmrden added this to the mg-v2.12.0 milestone Oct 9, 2023
@Josipmrden Josipmrden marked this pull request as ready for review October 19, 2023 12:29
Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

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

Looks good. Some comments (in part just from me being confused :))

src/storage/v2/inmemory/unique_constraints.cpp Outdated Show resolved Hide resolved
src/storage/v2/inmemory/unique_constraints.cpp Outdated Show resolved Hide resolved
src/storage/v2/inmemory/unique_constraints.cpp Outdated Show resolved Hide resolved
src/storage/v2/inmemory/storage.cpp Show resolved Hide resolved
@Josipmrden Josipmrden added the Docs - changelog only Docs - changelog only label Oct 24, 2023
Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

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

Looks good!

@Josipmrden Josipmrden merged commit 3d4d841 into master Oct 25, 2023
6 checks passed
@Josipmrden Josipmrden deleted the constraint-verification-update-only-on-necessary-actions branch October 25, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs - changelog only Docs - changelog only feature feature
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Improve unique constraints verification happening on all write queries because is too conservative
3 participants