question

rohansurana2810_190538 avatar image
rohansurana2810_190538 asked bryn.cooke_101029 answered

How do I implement transaction handling now that it's deprecated in DSE 6.8?

[FOLLOW QUESTION TO #4820]

I am trying to have two transactions and commit them. But if one of those two fails I don't want either of them to be executed basically I want to rollback it. And if it succeeds in committing both the transactions then close it.

try
{ 
 Transaction t1 ~ udpating an edge property
 Transaction t2 ~ updating a vertex related to the edge in t1.(i.e. t2 is dependednt on t1)
  t1.commit()
  t2.commit()
} 
          
catch() 
{ 
  rollback() //if one of the two transactions fails
} 
          
finally
{ 
   close() // close if successful in commiting both the transactions
} 

How can I do something like this in the DSE 6.8 graph?

dsegraph
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bryn.cooke_101029 avatar image
bryn.cooke_101029 answered

Mutations in 6.8 graphs are committed when a traversal is iterated out.

So you can get the same effect that you had before as long as you can combine your mutations in to one traversal.

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.