rossoha commented on PR #864:
URL:
https://github.com/apache/arrow-rs-object-store/pull/864#issuecomment-5855235000
Context for reviewers — this supersedes my earlier #862 (same branch, same
diff,
closed right after opening while the description was being rewritten) and it
overlaps #610.
Design-wise it matches the direction already discussed on #610 and in
[tomsanbear's rebase][rebase]: a unary `delete_opts` alongside the batch
`delete_stream` (as @tustvold proposed), with `UpdateVersion` as the version
identity so each backend can pick the field its native precondition needs
(GCS generation, S3/Azure ETag). Concretely, compared to #610's current head
(`DeleteOptions { if_match: Option<String> }`, which cannot express a GCS
generation):
- `DeleteOptions::precondition: Option<UpdateVersion>` — happy to rename
this to
`condition` to match [tomsanbear's rebase][rebase] if that shape is
preferred.
- `InMemory` performs the check and the removal under the same write lock,
so it
is genuinely atomic rather than check-then-delete.
- S3: an endpoint answering `501 Not Implemented` for `If-Match` on
`DeleteObject` is surfaced as `Error::NotSupported` (verified: LocalStack
responds `501`, so the test skips instead of failing), and conditional
deletes
honour the existing `S3ConditionalPut` gate. A test pins that the
unconditional
single-object path still uses bulk `DeleteObjects`.
- The trait docs state explicitly that a supporting backend must evaluate the
precondition atomically and must not emulate it with `HEAD` + `DELETE`.
- Evidence beyond request-shape tests: live runs against Azurite (stale
version →
`412` → `Error::Precondition`, newer object preserved, matching version
deletes)
and the finding that the fake GCS server used by the default integration
job
*silently ignores* `ifGenerationMatch` on delete, so the GCS scenario runs
only
against the real endpoint.
Happy to fold any of this into #610 or to align naming — just say which.
[rebase]:
https://github.com/tomsanbear/arrow-rs-object-store/tree/feat/conditional-deletes
--
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]