Skip to main content
Version: v2.1

Global Transaction Status Table

Taking the db mode as an example, global_table is the global transaction table of Seata. You can determine which state the global transaction is in by observing the status field in the global_table.

StatusCodeRemark
Global transaction begins (Begin)1This status can accept new branch transaction registration
Global transaction committing (Committing)2This status can change at any time
Global transaction commit retry (CommitRetry)3Retry commit after resolving commit exceptions
Global transaction rolling back (Rollbacking)4Rolling back global transaction in progress
Global transaction rollback retrying (RollbackRetry)5Retry transaction rollback after resolving global rollback exceptions
Global transaction timeout rollbacking (TimoutRollbacking)6Global transaction timeout rollbacking
Global transaction timeout rollback retrying (TimeoutRollbackRetrying)7Global transaction timeout rollback retrying
Asynchronous committing (AsyncCommitting)8Asynchronous commit
Two-phase committed (Committed)9Two-phase committed, the global transaction status will not change after this state
Two-phase commit failed (CommitFailed)10Two-phase commit failed
Two-phase global rollback (Rollbacked)11Two-phase global rollback
Two-phase global rollback failed (RollbackFailed)12Two-phase global rollback failed
Two-phase timeout rollback (TimeoutRollbacked)13Two-phase timeout rollback
Two-phase timeout rollback failed (TimeoutRollbackFailed)14Two-phase timeout rollback failed
Global transaction finished (Finished)15Global transaction finished
Two-phase commit retry timeout (CommitRetryTimeout)16Two-phase commit failed due to exceeding retry time limit
Two-phase rollback retry timeout (RollbackRetryTimeout)17Two-phase rollback failed due to exceeding retry time limit
Unknown status0Unknown status

Branch Transaction Status Table

StatusCodeNote
Branch Transaction Registered1Register branch transaction with TC (Registered)
Branch Transaction Phase One Done (PhaseOne_Done)2Branch transaction phase one business logic completed
Branch Transaction Phase One Failed (PhaseOne_Failed)3Branch transaction phase one business logic failed
Branch Transaction Phase One Timeout (PhaseOne_Timeout)4Branch transaction phase one processing timed out
Branch Transaction Phase Two Committed (PhaseTwo_Committed)5Branch transaction phase two committed
Branch Transaction Phase Two Commit Failed Retryable (PhaseTwo_CommitFailed_Retryable)6Branch transaction phase two commit failed and retriable
Branch Transaction Phase Two Commit Failed Unretryable (PhaseTwo_CommitFailed_Unretryable)7Branch transaction phase two commit failed and not retriable
Branch Transaction Phase Two Rolled Back (PhaseTwo_Rollbacked)8Branch transaction phase two rolled back
Branch Transaction Phase Two Rollback Failed Retryable (PhaseTwo_RollbackFailed_Retryable)9Branch transaction phase two rollback failed and retriable
Branch Transaction Phase Two Rollback Failed Unretryable (PhaseTwo_RollbackFailed_Unretryable)10Branch transaction phase two rollback failed and not retriable
Unknown Status0Unknown status

For better understanding, below are additional descriptions for individual states:

Global Transaction Timeout Rollbacking (TimeoutRollbacking)

How does it occur?

  1. When a seata global transaction is unable to complete business logic during execution.
  2. A scheduled task in TC (specifically used to find timed out global transactions) discovers that the global transaction has not completed rollback, it will change this global transaction to Global Transaction Timeout Rollbacking (TimeoutRollbacking) and start rollback, until the global_table data is deleted after rollback is completed.

Recommendation: When you find a global transaction in this state, investigate why the business cannot complete within the specified time. If it is indeed unable to complete, the global transaction timeout should be extended. (If everything is normal, please check if the tc cluster's time zone is consistent with the database. If not, please make it consistent).