Skip to content

Exclusive write to existing S3 location bigger than multi-part upload size fails with wrong exception #27401

@findepi

Description

@findepi

When TrinoOutputFile.createExclusive (or TrinoOutputFile.create before #27330, i.e. up to and including 478) writes to a pre-existing location, it is supposed to throw FileAlreadyExistsException and it indeed does so. However, when written size is bigger than multi-part upload size (32 MB by default), then the call fails with a wrong exception, because the S3 response is not translated to FileAlreadyExistsException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions