Samrat002 commented on code in PR #27187:
URL: https://github.com/apache/flink/pull/27187#discussion_r2932076208


##########
flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/writer/NativeS3RecoverableFsDataOutputStream.java:
##########


Review Comment:
   Let me clarify the contract and design here.
   
   This stream is exclusively used via RecoverableWriter (see 
NativeS3FileSystem.createRecoverableWriter()), not as a direct output stream. 
It implements Flink's RecoverableFsDataOutputStream abstraction, which has 
well-defined semantics:
   
   1. write(), flush(), sync() — for data writes and checkpointing
   2. persist() — explicit recovery state persistence
   3. closeForCommit() — only way to finalize (returns Committer that publishes 
the data)
   4. close() — abort/cleanup (called on task cancellation/failure)
   
   close() is only called on the error/cancellation path. It's not called after 
writing data without closeForCommit().
   
   This ensures there won't be any loose data on close 



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

Reply via email to