Re: Transactional operation in janus-graph through gremlin queries

HadoopMarc <bi...@...>

Hi Anjani,

Do you mean that there are still (extremely rare) failure situations possible despite the use of locking and the use of JanusGraph transactions? I am not sure if I can think of one and it would depend on ill-timed failures in the backend (e.g. power failure). One thing to worry about and that you could properly test, is whether all mutations in the JanusGraph transaction are sent to the backend in a single network request (otherwise JanusGraph could have persisted two of the five nodes and then fail). There are various configuration properties that might influence this:


Also see the comments for the tx.log-tx property.

HTH,    Marc

Op vrijdag 30 oktober 2020 om 15:58:39 UTC+1 schreef anj...@...:

Hi Marc,

Thanks for your response. Earlier i had look on the page you shared and from that my understanding is we can define consistency at property level and if same property is modified by two different threads then  consistency check from back-end happens and transaction can success or can throw locking exception. But this is applicable to a property of a singe node.

In my case i want to add/update property on  multiple nodes based on some condition.  For example based on some rules we see some nodes are related and we want to group them, for that want to add/update one property on multiple nodes, say want to add/update property on 5 nodes. In that case want to local all 5 nodes, update them and then release locks. 
- If update to any of the node fails then we should roll back updates to other nodes also.
- When update to 5 nodes are going on, no other threads should modify that property.



On Friday, 30 October 2020 at 19:26:10 UTC+5:30 HadoopMarc wrote:
Hi Anjani,

I am not sure if I understand your question and if your question already took the following into account:

What aspect of transactions do you miss? You can choose between tx.commit() for succesful insertion and tx.rollback() in case of exceptions.

Please clarify!


Op vrijdag 30 oktober 2020 om 08:15:36 UTC+1 schreef anj...@...:
Hi All,

We are using Janus 0.5.2 with Cassandra and Elastic-search. 
Currently for adding or updating a node we are using gremlin queries in java.  

We have a use case where we need to update multiple-nodes for a given metadata. We want to make sure updates to multiple nodes are transactional and when updates are happening, no other thread should update them.

Through gremlin queries do we have option to: 
 - achieve transaction updates.
 - locking/unlocking of nodes for updates?

Appreciate your thoughts/inputs.


Join { to automatically receive all group messages.