Repository navigation
v1.30.2
- Fix: a transaction opened before
Transaction.execute/executeOrError
(by its operations, e.g.store(o, transaction: t)thent.execute(...))
hung the caller when its adapter'sCOMMITfailed asynchronously
(PostgreSQL, MySQL, SQLite). The adapter sets thetransactionResult(its
COMMIT) when it opens the transaction, in the caller's errorZone, and
the commit listened to it inside the transaction's errorZone: the error
was only reported as uncaught in the caller's zone, andexecutenever
completed. The same for an aborted transaction (a block error) whose
rollback fails (as the adapters do):executeand itsresultFuturenever
completed. And forcommitcalled from another error zone.Transaction.transactionResultis now a getter/setter that records the
Zonewhere it's set: aFutureis listened to inside that zone, and
its value or error forwarded to the zone of the commit (or abort).
- Fix:
DBSQLMemoryAdapter.resolveTransactionResultchecked
is! TransactionAbortedErroron theFutureof
super.resolveTransactionResult(alwaystrue): the context of an aborted
transaction, already cancelled (rolled back and disposed), was also
"consolidated" and disposed a 2nd time (miscounting
poolDisposedElementsCount). The check is now on the transaction's result. - New tests: a failing
COMMITof a transaction opened beforeexecute/
executeOrError(memory, SQLite, PostgreSQL, MySQL), withcommitcalled
directly, and its rollback; atransactionResultset in another error zone
(execute, concurrentcommits, abort); the memory adapter's aborted and
committedresolveTransactionResult.
PR: #200