Skip to content

Conversation

@findepi
Copy link
Member

@findepi findepi commented Nov 16, 2025

Restore the behavior before as it was before support for conditional
writes was introduced. File existence checks are not implemented for
multi-part upload code path (the FileAlreadyExistsException is throw
only when multi-part did not take place). Furthermore, file existence
checks can break file writes when the call is retried on the AWS SDK
level. Fixing both these issues is possible, but not necessary: users of
TrinoOutputFile.create cannot assume particular behavior and file
system implementation is allowed to overwrite existing files.

Atomic writes are necessary for Delta's connector transaction log
synchronizer S3ConditionalWriteLogSynchronizer, but is explicitly
invokes TrinoOutputFile.createExclusive API.

Release notes considerations

  • Hive, Delta, Iceberg - fix potential FileAlreadyExistsException failure when network failures during s3 write

Restore the behavior before as it was before support for conditional
writes was introduced.  File existence checks are not implemented for
multi-part upload code path (the `FileAlreadyExistsException` is throw
only when multi-part did not take place). Furthermore, file existence
checks can break file writes when the call is retried on the AWS SDK
level. Fixing both these issues is possible, but not necessary: users of
`TrinoOutputFile.create` cannot assume particular behavior and file
system implementation is allowed to overwrite existing files.

Atomic writes are necessary for Delta's connector transaction log
synchronizer `S3ConditionalWriteLogSynchronizer`, but is explicitly
invokes `TrinoOutputFile.createExclusive` API.
@findepi
Copy link
Member Author

findepi commented Nov 17, 2025

(squashing)

@findepi
Copy link
Member Author

findepi commented Nov 17, 2025

CI

(again)

@findepi
Copy link
Member Author

findepi commented Nov 17, 2025

/test-with-secrets sha=2e7cdb83747248807d0b8a99a0aebd698445e66e

@github-actions
Copy link

github-actions bot commented Nov 17, 2025

The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/19433779789

@findepi findepi added the no-release-notes This pull request does not require release notes entry label Nov 17, 2025
@findepi findepi merged commit d3a7fd5 into trinodb:master Nov 18, 2025
142 of 147 checks passed
@findepi findepi deleted the findepi/s3 branch November 18, 2025 12:04
@github-actions github-actions bot added this to the 479 milestone Nov 18, 2025
@findepi findepi removed the no-release-notes This pull request does not require release notes entry label Nov 21, 2025
@findepi
Copy link
Member Author

findepi commented Nov 21, 2025

@chenjian2664 i reconsidered that this needs RN. Can you please add to #27153?
See update PR desc and i also created an issue #27400

@chenjian2664
Copy link
Contributor

@findepi Added for Hive, Delta, Iceberg and Hudi connectors in #27153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Writing to S3 may fail with FileAlreadyExistsException

4 participants