Closed sachinsudhi closed 3 years ago
+EDIT+
Hi @sachinsudhi
I mixed up the repos, I first responded to your issue in OGM, now I realize we're talking about the driver itself.
We have two options here: When you use idempotent, transactional functions as described in the manual: https://neo4j.com/docs/driver-manual/current/session-api/simple/#driver-simple-transaction-fn our internal transaction manager does exactly what you're requesting. As I guess you're working in Quarkus environment, I really recommend using the pure Java driver with transactional functions and do the mapping into domain objects explicitly ("by hand"). If the domain model is small enough, you would greatly benefit.
In case of Neo4j-OGM we cannot use them, as it abstract over a couple of different transports and participates in application transactions if available. In such cases we recommend using Resillience4j as @meistermeier demonstrated here: https://github.com/meistermeier/resilience4j-neo4j-ogm/blob/master/src/test/java/org/meistermeier/neo4j/resilience4j/ogm/SessionWithRetryTest.java
Would that help in your case?
Hi @sachinsudhi. It's been a while since we've heard anything back so we'll close the issue for now (sorry I'm not sure if you responded to the issue on the other repo that @michael-simons mentioned). Please feel free to reopen if we can provide any more help.
Neo4j version: Enterprise 3.5.8
Neo4j Mode: Cluster
Driver version: Java driver 4.0.1
Operating system: Mac OS 10.16
Steps to reproduce
Expected behavior: Recover from node when the leader node is restarting with a WRITE Query.
Actual behavior: Causing an exception before recovering.
Full Exception stack trace: