You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2026/09/09 20:17:32 UTC
[L] Change in asterixdb[master]: [ASTERIXDB-3826][TX] Fix data loss and hangs in atomic statement commit
From Ali Alsuliman <al...@gmail.com>:
Attention is currently required from: Murtadha Hubail.
Hello Anon. E. Moose #1000171, Jenkins, Murtadha Hubail,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21724?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Contrib+1 by Anon. E. Moose #1000171, Integration-Tests+1 by Jenkins
Change subject: [ASTERIXDB-3826][TX] Fix data loss and hangs in atomic statement commit
......................................................................
[ASTERIXDB-3826][TX] Fix data loss and hangs in atomic statement commit
- user model changes: no
- storage format changes: no
- interface changes: yes
Details:
GlobalTransactionContext.nodeResourceMap was a plain HashMap mutated
without synchronization by handleJobPreparedMessage, which the cluster
controller dispatches on one thread per message. A concurrent put lost a
node's entry, so sendJobCommitMessages skipped that node: its partitions
never committed and their records were lost, while the statement still
reported success after stalling for the whole commit timeout.
Fixed here, with the rest of how the protocol handles the same
acknowledgements:
- make nodeResourceMap concurrent and accumulate each partition's
prepared resources atomically
- test both waits' predicates while holding the monitor, and fail the
statement when the commit wait expires instead of reporting success
- open each round with beginPhase(phase, expectedAcks) taken from a
snapshot of the nodes actually messaged, and drop acknowledgements
belonging to a phase the transaction has already left
- roll back whatever the nodes recorded rather than only what a PREPARED
status implies, so a statement cancelled between job completion and
the commit does not strand flushed components on those nodes
- guarantee removal from txnContextRepository on the paths that own it
- assign the job id before the part of runTrackJob that can throw, so a
cancelled request still aborts and rolls back
Ext-ref: MB-73830
Co-Authored-By: Claude Opus 5 <no...@anthropic.com>
Change-Id: I2eff3bf5c1cc4349b2926a5c1b37b9a3dabc5a24
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/cc/GlobalTxManager.java
A asterixdb/asterix-app/src/test/java/org/apache/asterix/app/cc/GlobalTxManagerTest.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/IGlobalTransactionContext.java
M asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/GlobalTransactionContext.java
A asterixdb/asterix-transactions/src/test/java/org/apache/asterix/transaction/management/service/transaction/GlobalTransactionContextTest.java
5 files changed, 649 insertions(+), 50 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/24/21724/2
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21724?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I2eff3bf5c1cc4349b2926a5c1b37b9a3dabc5a24
Gerrit-Change-Number: 21724
Gerrit-PatchSet: 2
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <mh...@apache.org>
Gerrit-Attention: Murtadha Hubail <mh...@apache.org>