1483
MySQLERRORNotableTransactionsHIGH confidence
XA transaction branch was rolled back
Production Risk
High — the transaction branch was rolled back; the distributed transaction failed.
What this means
ER_XA_RBROLLBACK (1483, SQLSTATE XA100) is raised when an XA transaction branch is rolled back, typically because the resource manager determined a rollback was necessary.
Why it happens
- 1Deadlock detected within the XA transaction branch
- 2Resource manager-initiated rollback due to an internal error
- 3Application explicitly triggered an XA ROLLBACK
How to reproduce
trigger — this will error
trigger — this will error
XA START 'txn1'; INSERT INTO t VALUES (1); XA END 'txn1'; XA PREPARE 'txn1'; -- Resource manager rolls back: -- ERROR 1483 (XA100): XA_RBROLLBACK
expected output
ERROR 1483 (XA100): XA_RBROLLBACK: Transaction branch was rolled back
Fix
Handle XA rollback in the distributed transaction coordinator
Handle XA rollback in the distributed transaction coordinator
-- Detect and handle the rollback in application code -- Recover and verify state: XA RECOVER; -- Re-execute the transaction if appropriate
Why this works
The application or transaction coordinator must detect XA_RBROLLBACK and decide whether to retry or abort.
Sources
Official documentation ↗
MySQL 8.0 — 1483 ER_XA_RBROLLBACK
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev