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

[oIVz2Y7V] apoc.refactor.cloneNodes does not need to be in its own transaction #605

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

gem-neo4j
Copy link
Contributor

There was a github issue where a user complained that if the Cypher query failed after this procedure ran, the procedure itself still committed the result. This is because it opened new transactions inside, this seemed overkill, so removed that from happening.

Copy link
Contributor

@loveleif loveleif left a comment

Choose a reason for hiding this comment

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

Great! 👌

Comment on lines +172 to +173
List<Label> labels = getLabels(node);
return labels.toArray(new Label[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

You can go directly from stream to array

Suggested change
List<Label> labels = getLabels(node);
return labels.toArray(new Label[0]);
return getLabelsAsStream(node).toArray(i -> new Label[i]);

@gem-neo4j gem-neo4j merged commit 12a71ef into dev Feb 28, 2024
20 checks passed
@gem-neo4j gem-neo4j deleted the dev_remove_inner_tx_cloneNodes branch February 28, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants