End Transaction and Backout Transaction


My understanding is that if I use an End transaction all the updates or stores will be completed and we won’t be able to revert back.

But I used a Backout transaction in the immediate next line of End transaction. The database didn’t get updated.

Will backout transaction work even after End transaction

this sounds like a garbled interview question.

Once changes have been committed with an ET they cannot be reversed with a BT. A BT backs out changes up to the prior ET.

Yeah - the nature of this question makes me suspect an unclear understanding of the concept. No database would ever allow you to commit (ET) a transaction that you did a rollback (BT) to already. After a rollback (BT) you can re-execute the transactions again and then commit (ET) those.

Or the reverse, if you performed transactions and then did a commit (ET), you cannot then rollback (BT) to undo them. You would have to apply the transactions in reverse and then commit (ET) that to have the effect of a rollback (BT) after commit (ET).

Then you didn’t update as you think you did in the first place, there’s absolutely no way this can happen.

Yeah guys,

I was wrong. Today I checked the code and the updates really happened.

Sorry guys :frowning: