apoc icon indicating copy to clipboard operation
apoc copied to clipboard

Return query status for apoc.cypher.runTimeboxed

Open neo-technology-build-agent opened this issue 3 years ago • 2 comments

Issue by neo4j-apac Friday Jun 21, 2019 at 13:03 GMT Originally opened as https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/1233


Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use APOC, please ask on the Neo4j Discussion Forum instead of creating an issue here.

Feature description (Mandatory)

apoc.cypher.runTimeboxed terminates long running query and returns nothing, which makes it confusing as client wouldn't know whether the query find nothing or it's terminated.

Considered alternatives

Return a status code together with value. The status code should indicate:

  • query is complete
  • query is terminated
  • query failed due to syntax error

How this feature can improve the project?

Remove ambiguity and improve usability.

Comment by tolomaus Saturday Sep 05, 2020 at 17:05 GMT


Looking at the implementation details, could it be that the procedure may return partial results, in case the transaction is terminated while adding the results one by one in the queue?

Any chance that the fix by @sarmbruster could be merged anytime soon?

Comment by canbax Thursday Oct 15, 2020 at 05:24 GMT


I have the same problem. Why the code is not merged still? It's been more than a year.

There have been some updates here :) It will be released in an upcoming release! The changes adds a new config argument which gives the option to fail on error (so an exception is thrown by the proc if an exception is hit during the running or the timeout is hit) and an option to turn on a status update where the final row returned will give info on if the result set is complete or not :)

gem-neo4j avatar Jan 21 '25 12:01 gem-neo4j