-
Notifications
You must be signed in to change notification settings - Fork 493
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
apoc.refactor.cloneNodes() not compatible with (existence + unique) or node key constraints #2780
Comments
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 3, 2022
…ocedures internally handle errors instead of throwing them, leaving half-created results
vga91
added a commit
that referenced
this issue
May 20, 2022
neo4j-oss-build
pushed a commit
that referenced
this issue
May 20, 2022
vga91
pushed a commit
that referenced
this issue
May 20, 2022
neo4j-oss-build
added a commit
that referenced
this issue
May 20, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 25, 2022
…ocedures internally handle errors instead of throwing them, leaving half-created results (neo4j-contrib#2845)
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 25, 2022
…ocedures internally handle errors instead of throwing them, leaving half-created results (neo4j-contrib#2845)
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 26, 2022
…ocedures internally handle errors instead of throwing them, leaving half-created results (neo4j-contrib#2845)
vga91
added a commit
that referenced
this issue
May 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior (Mandatory)
Execution of
apoc.refactor.cloneNodes()
(and other clone operations) should be able to succeed even when existence and node key constraints are on the nodes in question, provided that the outcome of the refactoring should not violate the constraintsActual Behavior (Mandatory)
The refactoring fails, producing an error indicating a constraint violation. This appears to be because the refactoring first creates empty nodes with the given labels and then later populates their properties, tripping on the existence requirements of the constraints.
Note that when ONLY an existence constraint is present the refactoring will succeed, but if either existence + unique constraints are present on the same properties, or a NODE KEY constraint is present, the attempt will fail.
We may need to reorder the operations such that the labels are applied after properties are set, instead of before.
How to Reproduce the Problem
Steps (Mandatory)
:play movies
from the browser to create the sample graph in an empty db.CREATE CONSTRAINT ON (p:Movie) ASSERT (p.title, p.released) IS NODE KEY
The error will occur.
Alternately, create both a unique constraint and an existence constraint on the same property and attempt the clone operation, the same kind of error should occur
Specifications (Mandatory)
Currently used versions:
Versions
The text was updated successfully, but these errors were encountered: