[FLINK-40595][s3] Preserve multipart uploads during recoverable stream disposal - #29132
mateczagany wants to merge 1 commit into
Conversation
|
This adds a new field, a new constructor overload, and a concurrency edge case ( |
|
@gaborgsomogyi I would not mind skipping abort all together in Also, |
|
I've tested this against your What does break are 4 tests asserting plain
Which specific |
|
Yes, removing abort from However, aborting in
So the full fix would be either to:
|
|
Makese sense. Stepping back: I've now found two separate cases where selective abort corrupts recoverable state ( Given that, proactive abort only buys marginally faster cleanup within a retention window that must already be conservative for correctness reasons. That's not worth the recurring correctness risk of a hand-rolled flag/state machine that's already needed patching twice. Proposal: drop abort entirely, in both @Samrat002 WDYT since you've added that? |
|
Short history, The The reason it was added because In FLIP-555, the idea was to use S3 lifecycle management to clean up orphaned uploads: "a lifecycle rule will get it eventually". In production, what we observed most buckets don't have I'm on board with dropping both. Few notes:
We do lose FLINK-39786's case. A commit failure with no recoverable anywhere will now leak until the lifecycle rule fires. Worst case, if the bucket has no configured lifecycle rules. This is acceptable, as native-s3-fs does not claim to clean up orphan MPU. We can call this out in the documentation. I am alligned with proposal:
|
|
@mateczagany did you have the chance to take a look at this? I think at least we 3 are on the same page that we handle the abandoned MPUs the same way as the Hadoop based connector which would reduce the complexity significantly. |
b802f41 to
d656565
Compare
|
Thank you @Samrat002 and @gaborgsomogyi . I have force-pushed to the branch to update the S3 recoverable stream to never abort multipart uploads. |
What is the purpose of the change
Update the native S3 writer so that it never aborts multipart uploads as they may be needed for future recovery.
Since the stream cannot prove from process-local state that no retained checkpoint or savepoint references the upload, it now never aborts it, matching the Hadoop-based S3 file system. Abandoned uploads are left to an S3 lifecycle rule for incomplete multipart uploads.
Brief change log
close()and from thecloseForCommit()failure pathVerifying this change
This change is covered by existing and updated tests
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Codex GPT-6