cancel
Showing results for 
Search instead for 
Did you mean: 

Using bookmarks to chain transactions in standalone mode

aaron-dsouza
Node Link

Is there any mechanism to chain transactions when neo4j is in standalone mode. There’s a mechanism called causal chaining but that only works when neo4j is setup as a causal cluster, as per the documentation.
My requirement is to keep the transaction alive across multiple REST requests with a defined timeout.

3 REPLIES 3

dana_canzano
Neo4j
Neo4j

What version of Neo4j are you using?
Are you using a High Availability Cluster and with a load balancer? If so we would recommend enabling sticky session at the load balancer such that you connection remain at the same HA instance for the duration of the connection.
If using REST there is also https://neo4j.com/docs/http-api/3.5/actions/reset-transaction-timeout-of-an-open-transaction/ which will reset the trsnsaction timeout which is defined in conf/neo4j.conf at dbms.transaction.timeout

causal chaining is required in a causal cluster to ensure you can read your own writes since a write only needs to commit on more than 50% of the cluster members for the write to be committed. For example under a 3 member causal cluster you only need 2 of the 3 members to agree to commit for it to be comitted. The remaining 3rd member will eventually get the write

aaron-dsouza
Node Link

I’m using the MR 4.0 version. In my QA environment I’m not using clustering. Neo4j is setup as standalone. The REST API that I refer to is my webservice that consumes neo4j.

thanks for this detail

My requirement is to keep the transaction alive across multiple REST requests with a defined timeout.

then i suspect this should suffice https://neo4j.com/docs/http-api/3.5/actions/reset-transaction-timeout-of-an-open-transaction/

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.