mpiannucci opened a new issue, #325:
URL: https://github.com/apache/arrow-rs-object-store/issues/325

   Although available in the options of the object_store google cloud create, 
there is no way to use etag to conditionally put an object with google cloud 
storage. 
   
   **Additional context**
   
   Currently the 
[`put`](https://github.com/apache/arrow-rs/blob/38d6e691f4ee1b356f28d77b6820de67166c51c3/object_store/src/gcp/client.rs#L378)
 operation on GoogleCloudStorageClient accepts conditional put via 
`PutOptions::mode`:
   
   ```rust
           let builder = match &opts.mode {
               PutMode::Overwrite => builder.idempotent(true),
               PutMode::Create => builder.header(&VERSION_MATCH, "0"),
               PutMode::Update(v) => {
                   let etag = v.version.as_ref().ok_or(Error::MissingVersion)?;
                   builder.header(&VERSION_MATCH, etag)
               }
           };
   ```
   
   However, the implementation for `PutMode::Update` accepts an 
[`UpdateVersion`](https://github.com/apache/arrow-rs/blob/38d6e691f4ee1b356f28d77b6820de67166c51c3/object_store/src/lib.rs#L1133)
 but ignores the `e_tag` variant even though it [is supported by google 
cloud](https://cloud.google.com/storage/docs/request-preconditions#compose-preconditions).
 


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