DanielLeens commented on issue #12806: URL: https://github.com/apache/seatunnel/issues/12806#issuecomment-6217834216
Classification: A / Connector-V2 JDBC sink batch reduction and silent data loss. The current dev path supports the reported risk: BufferReducedBatchStatementExecutor retains only the last row kind for a primary key, and the enable_upsert=false executor chooses INSERT versus UPDATE from that retained record and the current database row. An INSERT followed by UPDATE_AFTER in one flush can therefore become an UPDATE of a row that has not yet been inserted. Please keep a fix narrowly focused on the reduction state machine. It must cover INSERT -> UPDATE_AFTER, DELETE -> INSERT, UPDATE_BEFORE -> UPDATE_AFTER, composite keys, and a checkpoint-flush path; each test should assert the target rows rather than only the executed statement. The same change must not alter enable_upsert=true semantics. An end-to-end MySQL CDC to JDBC regression for the reported same-checkpoint sequence is required before merge. Please link a focused PR here when that coverage is in place. -- 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]
