Only enqueue tasks when transaction is successfully finished.
When a transaction conflicts, the ISavepointDataManager's commit() method is called, followed by tpc_abort().
When the transaction is successful, commit() is called followed by tpc_finish().
Since we cannot roll back putting something in the queue we must enqueue the task in tpc_finish() and not in commit().
We assume that enqueueing a task does not fail.
Only enqueue tasks when transaction is successfully finished.
When a transaction conflicts, the ISavepointDataManager's
commit()
method is called, followed bytpc_abort()
. When the transaction is successful,commit()
is called followed bytpc_finish()
.Since we cannot roll back putting something in the queue we must enqueue the task in
tpc_finish() and not in commit()
. We assume that enqueueing a task does not fail.