Forum: Building VoltDB Clients

Post: Transactions and client application.

Transactions and client application.
Dec 22, 2014
Hi!, I was wondering what you have in mind under this scenario:
Let's say we have 2 stored procedures, and that for some reason, this procedures are being called from the client application like this:
Each procedure commits separately, but what can the client application do if he wants to rollback Procedure1 (already committed) when Procedure2 fails.
Dec 22, 2014

There are 2 things you could do. One option is to put callprocedure1/callprocedure2/dootherimportantthings in one stored procedure. This will either all succeed or all fail. The other method is you create a 3rd procedure to rollback the changes in callprocedure1. Keep in mind, data may have changed between the time callprocedure1 and callprocedure3 is called.
Let me know if you have any questions.

Peter Zhao
Dec 22, 2014
Hi pzhao!
Those two options are what I had in mind. Thanks for the reply!.