When Delete and Read queries are executed on a database in parallel, it is possible to come across an error like this:
org.neo4j.kernel.impl.util.ReadAndDeleteTransactionConflictException:
Database elements (nodes, relationships, properties) were observed during query execution,
but got deleted by an overlapping committed transaction before the query results could be serialised.
The transaction might succeed if it is retried.
This happens because read queries do not lock the nodes and relationships they are reading.
A concurrent delete query can delete nodes or relationships that have been read by another transaction but have not yet been returned.
Typically, errors of this nature do not raise significant concerns unless they become frequent.
However, if these errors occur frequently, you would need to reconsider your data model.
To work around this issue, implement retries in your code.
You can find further information about implementing retries using MaxTransactionRetryTime in our official documentation for the driver you are using: Client Applications - Configuration
Comments
0 comments
Please sign in to leave a comment.