Titan 0.9.0-M1 and TransactionRetryStrategy

36 views
Skip to first unread message

Sven Zethelius

unread,
Apr 23, 2015, 10:45:52 AM4/23/15
to aureliu...@googlegroups.com
I've been experimenting with Titan 0.5.4.  I got my use case working, but then decided to try out 0.9.0-M1.  Of course I got a bunch of compile problems due to the tinkerpop changes.  I was able to find the equivalent APIs to work with for all but one of the compile errors.

In my extension, I'm using the com.tinkerpop.blueprints.util.TransactionRetryStrategy.  All the uses of TransactionRetryStrategy use TransactionalGraph.  In 0.5.4, TitanGraphTransaction extended TransactionalGraph.  In 0.9.0-M1, that is no longer the case.  As far as I can tell, there isn't any titan classes or interfaces that implement TransactionalGraph.

I was using the TransactionRetryStrategy as part of a complex insert into the graph (multiple Vertex and Edges together in one transaction), where one or more of the Vertex has a unique index.  I expect that some transaction inserts will fail because there may be two threads/servers trying to both do an insert of the same unique vertex, hence causing an SchemaViolationException on one of them.  The TransactionRetryStrategy is there to retry the whole transaction which should complete because it will detect the newly added vertex and not try to reinsert it on the next attempt.

I can work around this by implementing the thin amount of logic in the strategy myself, but I wanted to point out that the change to TitanGraphTransaction now disallow the use of these classes.

On a related note, TitanGraphTransaction javadoc talks about aborting transactions but there is no methods to support rolling back the operations already made.


Stephen Mallette

unread,
Apr 23, 2015, 11:21:28 AM4/23/15
to aureliu...@googlegroups.com
TransactionalGraph no longer exists in TP3.  Please review the latest docs on TP3 transactions - there's a bit of content there on how "retry" is done in TP3:


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/7b075887-37aa-41bb-b901-d3ea29c1c36c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages