goutamadwant opened a new issue, #13105: URL: https://github.com/apache/seatunnel/issues/13105
### Problem While testing #12983, I reproduced XA cleanup rolling back a sibling table writer's prepared transaction. Both writers share the same XA resource, job and subtask, so recovery must also distinguish table/writer ownership. Reproduced on the unreleased #11932 head `61eb51c29a5647288958da95e07ffdd34009c157`. This is not a claim about all released versions. ### Reproduction 1. Create two table writers sharing an XA resource and job/subtask identity. 2. Prepare a restored checkpoint transaction, an orphan owned by writer A, and a transaction owned by writer B. 3. Restore A and run cleanup. **Before:** B's transaction can be rolled back as an orphan. **With the patch:** cleanup rolls back only A's orphan; restored checkpoint and peer transactions survive. Live commits still report unknown-XID failures. ### Validation The baseline ownership probes failed before the fix. [XaGroupOpsImplTest](https://github.com/goutamadwant/seatunnel/blob/93503a7d58dbc95b58ed3d7f896670a4860e68bf/seatunnel-connectors-v2/connector-jdbc/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/xa/XaGroupOpsImplTest.java) includes `testRecoveryDoesNotRollbackSiblingWriterWithSameSubtask`; writer, rollback/retry and real-resource XA tests were added too. The combined JDBC/Flink/collector tree passed 62 focused checks and nine native cases across Flink 1.13/1.15/1.18/1.20, including multi-table MySQL XA restore and worker loss. Those native results include the separate Flink fix. Full repository verify passed with tests skipped; tests ran separately. Hosted CI has not passed for the original branch; its failure is being investigated separately. ### Scope Track the eight-file JDBC ownership fix here. Collector restore stays in #12983; Flink commit routing has a separate issue. Native configuration and job setup: [Flink restore fixture](https://github.com/goutamadwant/seatunnel/blob/0df6a72070699eaa6cacfbfa77ea9363e8999271/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mysql-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/MysqlCDCWithFlinkSchemaChangeIT.java). For the isolated regression, run `SemanticXidGeneratorTest`, `XaGroupOpsImplTest` and `JdbcExactlyOnceSinkWriterTest` in the JDBC module with dependencies built. The failure is an ownership assertion, not a required SQL exception. -- 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]
