Check Ahead
Why you need it?
Seata supports four major transaction modes: AT, TCC, SAGA, and XA. However, seata-benchmark-cli currently only supports AT, TCC, and SAGA.
At the moment, XA is missing from the benchmark CLI entirely:
BenchmarkConfig.validateMode() rejects XA
BenchmarkRunner.createExecutor() does not provide an XA executor
This leaves benchmark coverage incomplete and prevents users from comparing XA behavior with the other supported transaction modes in the same tool.
How it could be?
A possible direction is:
- add
XA support to benchmark CLI mode validation and runner dispatch
- introduce
XAModeExecutor following the general structure used by the other executors
- keep
--branches 0 as empty mode for pure protocol-overhead testing
- support
--branches > 0 as real XA mode
- implement a practical MVP for real XA mode using MySQL XA with Testcontainers
- define clear
--branches semantics, for example: each global transaction registers N XA branches
- support rollback scenarios through
--rollback-percentage
- update README with runnable examples and explain the behavior of empty mode vs real XA mode
If needed, the first implementation can prioritize a simple, reproducible XA benchmark setup before expanding to more advanced multi-resource scenarios.
Other related information
Current implementation evidence:
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/config/BenchmarkConfig.java
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/BenchmarkRunner.java
test-suite/seata-benchmark-cli/README.md
Suggested acceptance criteria:
- benchmark CLI accepts
--mode XA
--branches 0 runs empty XA benchmark mode
--branches > 0 runs a real XA benchmark path
- rollback percentage can trigger XA rollback behavior
- final report remains consistent with existing benchmark output
- README includes at least one runnable XA benchmark example
Check Ahead
Why you need it?
Seata supports four major transaction modes: AT, TCC, SAGA, and XA. However,
seata-benchmark-clicurrently only supportsAT,TCC, andSAGA.At the moment, XA is missing from the benchmark CLI entirely:
BenchmarkConfig.validateMode()rejects XABenchmarkRunner.createExecutor()does not provide an XA executorThis leaves benchmark coverage incomplete and prevents users from comparing XA behavior with the other supported transaction modes in the same tool.
How it could be?
A possible direction is:
XAsupport to benchmark CLI mode validation and runner dispatchXAModeExecutorfollowing the general structure used by the other executors--branches 0as empty mode for pure protocol-overhead testing--branches > 0as real XA mode--branchessemantics, for example: each global transaction registersNXA branches--rollback-percentageIf needed, the first implementation can prioritize a simple, reproducible XA benchmark setup before expanding to more advanced multi-resource scenarios.
Other related information
Current implementation evidence:
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/config/BenchmarkConfig.javatest-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/BenchmarkRunner.javatest-suite/seata-benchmark-cli/README.mdSuggested acceptance criteria:
--mode XA--branches 0runs empty XA benchmark mode--branches > 0runs a real XA benchmark path