You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mpiannucci (via GitHub)" <gi...@apache.org> on 2025/04/07 14:20:29 UTC
[I] [Object Store] Google Cloud storage doesnt support ETag for conditional put operations [arrow-rs-object-store]
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org