You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhat related to #64. Transaction.join functions the same whether a transaction is aborted or doomed or fully active. Should it allow that? What's the point of adding a resource manager to a transaction that can only be, or already has been, aborted?
On first glance this seems somewhat counterintuitive. I would have expected join to raise an exception like DoomedTransaction and AbortedTransaction instead of just allowing it. Maybe resource managers have already acquired resources before they make the call to join so it's important to be able to abort them later? But you can't currently abort transactions more than once, so that seems like an opportunity for bad behivour and leaks. join could automatically abort resource managers to cover that case.
defjoin(self, resource):
ifself.isAborted() orself.isDoomed():
resource.abort()
raiseAbortedTransactionifself.isAborted() elseDoomedTransaction# As before
...
The doom() documentation says the transaction is otherwise like normal, so for backwards compatibility this might be best limited to aborted transactions.
The text was updated successfully, but these errors were encountered:
Somewhat related to #64.
Transaction.join
functions the same whether a transaction is aborted or doomed or fully active. Should it allow that? What's the point of adding a resource manager to a transaction that can only be, or already has been, aborted?On first glance this seems somewhat counterintuitive. I would have expected
join
to raise an exception likeDoomedTransaction
andAbortedTransaction
instead of just allowing it. Maybe resource managers have already acquired resources before they make the call tojoin
so it's important to be able toabort
them later? But you can't currently abort transactions more than once, so that seems like an opportunity for bad behivour and leaks.join
could automatically abort resource managers to cover that case.The
doom()
documentation says the transaction is otherwise like normal, so for backwards compatibility this might be best limited to aborted transactions.The text was updated successfully, but these errors were encountered: