You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "det101 (via GitHub)" <gi...@apache.org> on 2026/09/02 01:29:07 UTC
Re: [PR] [Feature][Connector-V2] Support MySQL-CDC TRUNCATE TABLE as a table-operation event [seatunnel]
det101 commented on PR #12014:
URL: https://github.com/apache/seatunnel/pull/12014#issuecomment-5502967006
Thanks @DanielLeens for the thorough review.
**Issue 1 (High) — agreed, fixed in 1548efa32**
`JdbcExactlyOnceSinkWriter.prepareCommit()` only XA-prepares; committing on a second connection before `TRUNCATE` would hang on MySQL MDL (and a later XA commit could resurrect truncated rows). TRUNCATE is DDL and cannot join a prepared XA transaction, so committing first would also break exactly-once.
The XA writer now overrides `applyTableOperation` and fail-fasts with `UnsupportedOperationException`. JDBC sink must keep `exactly_once = false` (the default). Covered by `JdbcExactlyOnceSinkWriterTest.applyTableOperationIsRejectedOnXaWriter`, and documented in `docs/en` + `docs/zh` (`MySQL-CDC.md` / `Jdbc.md`).
**Issue 2 (Low) — no code change**
`TruncateTableEvent.jobId` is populated the same way as `SchemaChangeEvent`: `IncrementalSourceRecordEmitter` calls `eventListener.onEvent(event)`, and `JobEventListener` / `DefaultEventProcessor` set `jobId`. The field is required by the `Event` interface; only a Javadoc was added to make that path explicit.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org