RuntimePublic.Db API: CommittableTransaction vs RequestTransaction

RuntimePublic.Db API: CommittableTransaction vs RequestTransaction

CommittableTransaction vs RequestTransaction

In your code, when an extension method (action) is called and it raises an exception error, what happens when you use CommittableTransaction vs RequestTransaction? RequestTransaction will commit and rollback a transaction automatically whereas CommittableTransaction will not commit and rollback transaction automatically?
Hi Robert,

The RequestTransaction is the same transaction that is being used in Aggregates and Advanced queries. It will either be commited or rollbacked at the end of the request or when an exception occurs.

The CommitableTransaction is a separate transaction that is created in that moment.
You are responsible for either commit or rollback it.

Also BOTH of them need to use the "using"/"try finally" pattern as shown in the help pages to avoid connection leaks.
By default CommitableTransactions will rollback when leaving a using block that did not commit them.

João Rosado