How can I Rollback Tree structure from graph database? #1201
jayaemekar
started this conversation in
General
Replies: 1 comment
-
You're right, there's no transaction semantics for the Gremlin API on CosmosDb. If a Gremlin query adds/updates/deletes multiple elements in the graph, a partial failure may leave the graph in an inconsistent state. I'd recommend AWS Neptune which does support transactions under snapshot semantics. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
seeking some advice on our rollback approach for Cosmos DB using Gremlin APIs in case one of the vertices create/update operation fails.
Is there a way I can roll back the Agreement tree completely or restore the last saved state?
Based on my current research and following this documentation, I can see that Transactions are not supported and here's the read out:
Transactions aren't supported because of distributed nature of the system. Configure appropriate consistency model on Gremlin account to "read your own writes" and use optimistic concurrency to resolve conflicting writes.
Current Implementation:
We are using Cosmos DB using Apache Gremlin API to store our service’s data. Based on our use case, we store agreement tree like structure where agreement vertex is connected to multiple packages and package vertex can be connected to multiple child vertices.
Possible Point of Failure referring to the above question:
Creation/update failure for any of the package/service/contact vertices
Target Behavior:
In case of failure during creation operation, the complete Agreement tree needs to be deleted.
In case of failure during update operation, previous/existing agreement tree need to be retrieved/restored.
Beta Was this translation helpful? Give feedback.
All reactions