nzw921rx commented on PR #13201:
URL: https://github.com/apache/seatunnel/pull/13201#issuecomment-6818068966

   ### Local validation
   
   - PR head: `6e5ef292847ac74d9de5a64f3c8b4705a433737a`
   - Baseline: `379292194cc9ee9ecba2f6adf07cefcc94a7db21`
   - Environment: JDK 11.0.29, MySQL 8.0.36, MySQL Connector/J 8.0.27.
   - Tests directly exercised the actual MultiTableSink writer lifecycle and 
production JDBC writer against MySQL.
   
   #### 1. Build and API tests
   
   Ran Spotless, API reactor `verify`, and all `MultiTable*Test` classes.
   
   - 46 tests passed, with no failures, errors, or skips.
   - `git diff --check` passed.
   
   #### 2. Normal JDBC timer flush
   
   Created two isolated MySQL tables with 50 records each. An INSERT trigger 
added a fixed 20 ms processing delay per row. Tested 1, 2, and 5 writer queues, 
with two runs per version.
   
   | Writer queues | Baseline average | PR head average |
   | --- | ---: | ---: |
   | 1 | 2136.9 ms | 2139.4 ms |
   | 2 | 2143.1 ms | 1129.9 ms |
   | 5 | 2173.4 ms | 527.0 ms |
   
   Independently read the complete `(id, ver)` row sets using PyMySQL. All 
matched the expected records.
   
   #### 3. Concurrent failures during checkpoint preparation
   
   Used real MySQL row locks to make two tables on separate queues fail with 
lock-wait timeouts under `CONTINUE_OTHER_TABLES`, alongside a healthy table.
   
   - Baseline: preparation remained blocked after 12 seconds; the JVM thread 
dump identified a two-thread monitor deadlock.
   - PR head: two runs completed preparation in approximately 2.16 seconds. 
Both failed tables were recorded as isolated in the snapshot, and both 
healthy-table records were correctly committed.
   
   #### 4. Closing while JDBC I/O is blocked
   
   Held a MySQL row lock, started the registered aggregated JDBC flush, 
confirmed the database lock wait through `performance_schema`, and invoked 
`close()` while the JDBC operation was still blocked.
   
   With `socketTimeout=0`, held the lock for 65 seconds and captured the 
waiting threads before releasing it.
   
   | Version | Close elapsed time | Completion after lock release |
   | --- | ---: | ---: |
   | Baseline | 65.105 s | 7.13 ms |
   | PR head | 65.113 s | 9.01 ms |
   
   After release, both versions completed closing. The healthy-table data and 
the successfully unblocked write matched expectations.
   
   Repeated with a 3-second socket timeout. Closing ended in approximately 
2.7–3.0 seconds and propagated the JDBC timeout error.
   
   Also exercised closing while another table’s failure-isolation path was 
waiting for the blocked queue. After releasing the database lock, closing 
completed in approximately 11.5 ms, and the healthy-table data remained intact.
   
   After testing, no test database sessions or row-lock waits remained.


-- 
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]

Reply via email to