apache / apache/arrow-rs-object-store

Feature-request : Implement Other Putmodes for HttpStore

Open
#844 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
322
Forks
212
Avg merge
5d 2h
Merged PRs (30d)
10

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

`HttpStore::put_opts` only supports `PutMode::Overwrite`. Using `PutMode::Create` or `PutMode::Update` returns `Error::NotImplemented`. Every other backend (`aws`, `azure`, `gcp`) already supports both, so `HttpStore` can't be used for optimistic-concurrency writes (e.g. create-if-absent, update-if-unchanged).

**Describe the solution you'd like**

Implement `PutMode::Create` and `PutMode::Update` for `HttpStore` using standard HTTP conditional headers:

- `PutMode::Create` → `If-None-Match: *`
- `PutMode::Update(v)` → `If-Match: ""`

Map failures back to existing error types:
- `Create` + `412` → `Error::AlreadyExists`
- `Update` + `412` → `Error::Precondition`

**Describe alternatives you've considered**

Using the WebDAV `If` header (RFC 2518 §9.4) instead — not needed here since it's built for lock tokens, and `PutMode` only needs ETag-based conditions. Plain `If-Match`/`If-None-Match` is simpler and works on more generic HTTP servers.

**Additional context**

Not all servers honor conditional headers on PUT — this is optional server behavior. This change does not add WebDAV locking support.

Contributor guide

Open the contributing guide

Research direction

Start at HttpStore::put_opts and compare its handling with the existing aws, azure, and gcp backends. Trace how conditional HTTP headers and 412 responses map to existing error types; done means Create and Update use the requested conditions while Overwrite remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.