fatmanverse commented on issue #13408: URL: https://github.com/apache/seatunnel/issues/13408#issuecomment-7119564071
Hi, I would like to take this issue and submit a PR. I reviewed #9773 and #9805. #9805 already provides the format-level merge behavior and file sink integration, while Kafka Sink still needs the configuration and writer integration. My proposed scope is: - Add the opt-in `merge_update_event` option to Kafka Sink with a default of `false`. - Enable it only for `canal_json` value serialization, while preserving the existing key, topic, partition, and payload behavior when disabled. - Merge an ordered `UPDATE_BEFORE`/`UPDATE_AFTER` pair within the same sink writer into one Canal `UPDATE` event, and avoid sending the cached `UPDATE_BEFORE` as a Kafka tombstone. - Keep standalone `INSERT` and `DELETE` behavior, and add unit tests and English/Chinese documentation. The first implementation scope assumes that the pair arrives in order at the same writer. I would appreciate maintainer guidance on the following edge cases before the PR is finalized: 1. Should an unmatched `UPDATE_BEFORE` fall back to a standalone `DELETE`, or should it remain buffered until a matching `UPDATE_AFTER` arrives? 2. If a checkpoint or recovery occurs between the two rows, should the pending row be persisted in sink state, or should the pair fall back to separate events? 3. For primary-key or topic changes, should the merged record use the `UPDATE_AFTER` routing key/topic, or another rule? I can proceed with the implementation and update the PR according to the agreed semantics. -- 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]
