If your cypher queries are run with the default runtime engine (slotted runtime), you may encounter errors similar to the below one:
AssertionError: expected [Neo4jError: A bug has occurred in the slotted runtime: The
target slotted execution context cannot hold the data to copy
What is a Cypher runtime?
Using the execution plan, the query is executed — and records returned — by the Cypher runtime.
Depending on whether Neo4j Enterprise Edition or Neo4j Community Edition is used, there are three different runtimes available:
- Interpreted: In this runtime, the operators in the execution plan are chained together in a tree, where each non-leaf operator feeds from one or two child operators.
- Slotted: Very similar to the interpreted runtime, except that there are additional optimizations regarding the way in which the records are streamed through the iterators.
- Pipelined: Introduced in Neo4j 4.0 as a replacement for the older compiled runtime used in the Neo4j 3.x versions.
If the default runtime fails to run and execute your query, you should consider an alternative.
Using slotted runtime, you can run the same query and specify another runtime=interpreted (or pipelined).
Please prefix CYPHER runtime=Interpreted
or CYPHER runtime=pipelined
before the actual query.
Example:
CYPHER runtime=Interpreted MATCH (tom {name: "Tom Hanks"}) RETURN tom
CYPHER runtime=pipelined MATCH (tom {name: "Tom Hanks"}) RETURN tom
Comments
0 comments
Article is closed for comments.