DoChaoing opened a new pull request, #8015:
URL: https://github.com/apache/incubator-seata/pull/8015

   ### Ⅰ. Describe what this PR did
   
   This PR adds XA transaction mode support to the benchmark CLI, completing 
the coverage of all four Seata transaction modes (AT/TCC/SAGA/XA).
   
   ### Ⅱ. Does this pull request fix one issue?
   
   Fixes #8010
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)?
   
   The benchmark CLI itself is a testing tool. Running `--mode XA` with various 
parameters serves as the test.
   
   ### Ⅳ. Describe how to verify it
   
   1. Build the benchmark CLI: `mvn clean package -pl 
test-suite/seata-benchmark-cli -DskipTests`
   2. Run XA mode with empty transaction: `java -jar seata-benchmark-cli.jar 
--mode XA --branches 0 --threads 10 --duration 60`
   3. Run XA mode with real transactions (requires Docker): `java -jar 
seata-benchmark-cli.jar --mode XA --branches 2 --threads 10 --duration 60`
   
   ### Ⅴ. Special notes for reviewers
   
   **Changes:**
   
   1. **XAModeExecutor.java** (new file)
      - Follows the same pattern as `ATModeExecutor`
      - Supports `--branches 0` for empty transaction mode (pure protocol 
overhead testing)
      - Supports `--branches N` for real mode with MySQL via Testcontainers
      - Uses `DataSourceProxyXA` for XA transaction support
   
   2. **BenchmarkConfig.java**
      - Updated `validateMode()` to accept XA mode
   
   3. **BenchmarkRunner.java**
      - Added `XAModeExecutor` import
      - Added XA case in `createExecutor()` method
   
   **Key Differences from AT Mode:**
   - AT mode uses `DataSourceProxy` with automatic undo log
   - XA mode uses `DataSourceProxyXA` with XA protocol (2PC)
   - Both support empty and real transaction modes for comprehensive 
performance testing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to