actiontech/txle

[issue][rollback][concurrent]TXLE cannot roll back all timeout transactions

asiroliu opened this issue · 2 comments

Describe The Bug

In the case of concurrent timeout transactions, TXLE cannot roll back all timeout transactions and the final result is inconsistent.

TXLE Version

https://github.com/actiontech/txle/commit/2bb2dbc19c030a2eff4770928373ae7bcb758c63

To Reproduce

Steps to reproduce the behavior:

  1. use jmeter
Number of Threads: 10
Loop Count: 10
Path: /testGlobalTransactionTimeout/1/2/1

Expected Result

TXLE roll back all timeout transactions and the final result is consistent.
Observing data through prometheus:

key value
utx_transaction_total 100
utx_transaction_successful_total 0
utx_transaction_failed_total global:100
utx_transaction_rollbacked_total 100
utx_transaction_retried_total 0
utx_transaction_timeout_total 100
utx_transaction_child_total user:100
merchant:100
utx_sql_total global:400
user:620

Real Result

  1. the number of utx_transactionRollbacked_total is less than 100
  2. user balance is not roll back to initial value
  3. merchant balance is roll back to initial value
  4. the total number of user balance add merchant balance is less than the initial value

Fixed. See the commit log.

VERSION:

2bb2dbc

Verification:

  1. use jmeter
Number of Threads: 10
Loop Count: 10
Path: /testGlobalTransactionTimeout/1/2/1
  1. the number of utx_transaction_rollbacked_total is 100
  2. both user balance and merchant balance are roll back to initial value