You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/04/20 14:34:03 UTC

Re: [I] [connector-file-base][flink] Streaming file sink may lose data due to prepareCommit/write race and aggressive txn dir cleanup [seatunnel]

DanielLeens commented on issue #9826:
URL: https://github.com/apache/seatunnel/issues/9826#issuecomment-4281711716

   I looked through the file sink commit path and this does look like a real Flink Streaming consistency issue, not a Hive config problem.
   
   The risky part is the checkpoint handoff around the v1 sink translation: `prepareCommit()` closes and returns the files for the current transaction, while the writer state is only rotated later during `snapshotState()`. Under Flink Streaming, that can leave a window where new records are still written under the transaction directory that the committer is about to rename and clean up. That matches the symptoms here: checkpoint failure, `source missing` during rename, and possible data loss for File/Hive sinks.
   
   I also found the follow-up PR #10158, which is still open and is much better aligned with the root cause than the older closed PR #9828. The current direction in #10158 is to keep the fix local to the Flink translation semantics so that `prepareCommit(checkpointId)` and `snapshotState(checkpointId)` are effectively handled back-to-back from the SeaTunnel sink's point of view.
   
   So I think this issue should stay open and continue tracking #10158. Once that PR is merged into `dev`, it would be very helpful to verify the same Kafka -> Hive/File streaming case again, especially with the higher-throughput scenario where you reproduced the missing-source rename failure.
   


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