lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

Add CopyIfNotExists to S3 Gateway

Open ion-elgreco opened this issue 1 year ago • 0 comments

If the LakeFS-S3 gateway can support CopyIfnotExists through headers then we can pass them as storage_options to the object store crate, for reference see this: https://docs.rs/object_store/latest/object_store/aws/enum.S3CopyIfNotExists.html#variant.Header

Some S3-compatible stores, such as Cloudflare R2, support copy if not exists semantics through custom headers.

If set, ObjectStore::copy_if_not_exists will perform a normal copy operation with the provided header pair, and expect the store to fail with 412 Precondition Failed if the destination file already exists.

ion-elgreco avatar Apr 08 '24 14:04 ion-elgreco