Skip to content

Retry idempotent queries using builtin mechanism in neo4j driver #868

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

Merged
merged 7 commits into from
Jun 5, 2025

Conversation

FlorentinD
Copy link
Contributor

No description provided.

@FlorentinD
Copy link
Contributor Author

Copy link

netlify bot commented Apr 16, 2025

Deploy Preview for neo4j-graph-data-science-client canceled.

Name Link
🔨 Latest commit 435274c
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-graph-data-science-client/deploys/67ff7096595f7600081c59c9

@FlorentinD FlorentinD force-pushed the run-cypher-retryability branch from 435274c to 3781b2d Compare June 3, 2025 11:54
Copy link

netlify bot commented Jun 3, 2025

Deploy Preview for neo4j-graph-data-science-client canceled.

Name Link
🔨 Latest commit 0d4b426
🔍 Latest deploy log https://app.netlify.com/projects/neo4j-graph-data-science-client/deploys/68414b56943e65000883fab2

@FlorentinD FlorentinD changed the title WIP use execute query Retry idempotent queries using builtin mechanism in neo4j driver Jun 3, 2025
@FlorentinD FlorentinD marked this pull request as ready for review June 3, 2025 11:58
@FlorentinD FlorentinD force-pushed the run-cypher-retryability branch from 3781b2d to 4d2ac35 Compare June 3, 2025 11:59
Comment on lines +261 to +262
routing = neo4j.RoutingControl.WRITE if "write" in endpoint else neo4j.RoutingControl.READ
return self.run_retryable_cypher(query, params, database, custom_error, routing=routing)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this ever be a safe combination. Our write are not always idempotent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the main case was gds.arrow.write.v3

Maybe should rather have it explicit in for the write protocol case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay its already explicit as before the caller needs to have passed retryable=True explicitly

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe instead of doing the string matching we could pass in the RoutingControl from the caller

@FlorentinD FlorentinD merged commit 27fe457 into neo4j:main Jun 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants