Skip to content

CAS-4: Verify conditional-write semantics against real MinIO and Wasabi endpoints #285

Closed

Description

@scttfrdmn

Context

Fourth issue in the CAS series adopted from #169
/ docs/design/conditional-writes-vs-raft.md. Depends on #282.

§4 of the doc builds a compatibility matrix for conditional writes, and is explicit that two of its
four rows do not rest on evidence strong enough to ship against
:

Backend Conditional write on PUT Evidence Confidence
AWS S3 Yes — If-None-Match: * and If-Match on PutObject, CompleteMultipartUpload, CopyObject; conditional deletes too AWS docs good
MinIO Yes, both. PutObjectOptions.SetMatchETag / SetMatchETagExcept (minio-go/[email protected]/api-put-object.go:126,140) emit If-Match / If-None-Match source read only the client emits the header; that the server enforces it is unverified, and minio-go's own doc comment calls this "a MinIO specific extension to support optimistic locking semantics"
Ceph RGW No — PUT Object documents only content-md5, content-type, x-amz-meta-*, x-amz-acl; conditional headers documented for GET/HEAD only Ceph objectops documentation absence, not a probe
Wasabi Unverified — knowledge base moved, current S3 API reference did not resolve; no citable statement either way none treat as Ceph until probed

This matters because the v0.14.0 metadata-fallback path exists precisely for these backends. Shipping
a coordination feature whose safety depends on a header the endpoint might silently ignore is the
failure mode the design is trying to avoid: an ignored precondition turns "exactly one node performs
this tier transition" into "every node does," silently.

The dangerous case is a backend that succeeds at a conditional write while ignoring the
condition.
A documentation read cannot detect that. Only a probe against a real endpoint can.

What to verify

Against a real MinIO and a real Wasabi endpoint, not an emulator and not a source read:

  1. If-None-Match: * is enforced. Two sequential creates of the same key: the second must fail,
    not overwrite. Then two concurrent creates: exactly one succeeds.
  2. If-Match: <etag> is enforced. A write with a stale ETag must fail and leave the object
    byte-for-byte unchanged. Assert the bytes, not just the status.
  3. If-Match on an absent key returns not-found rather than precondition-failed (the distinction
    CAS-1: Backend.PutObjectIf — preconditions, sentinel errors, and a capability probe #282 makes load-bearing for recovery).
  4. The error codes. Confirm what each backend returns — PreconditionFailed,
    ConditionalRequestConflict, something else, or an HTTP status with no S3 code. CAS-1: Backend.PutObjectIf — preconditions, sentinel errors, and a capability probe #282 maps on
    smithy.APIError codes rather than message text; if a backend returns a different code, the
    mapping needs a case, and if it returns none, the probe must classify it unsupported.
  5. The CAS-1: Backend.PutObjectIf — preconditions, sentinel errors, and a capability probe #282 capability probe gives the right answer on each endpoint. This is the acceptance test
    that matters most: the probe is what every downstream feature trusts.
  6. ETag semantics on multipart. Multipart ETags are not MD5s and differ in format across
    implementations; confirm an ETag from a multipart upload can be used in a subsequent If-Match.
  7. Same checks against Ceph RGW if an endpoint is reachable — the matrix's "No" row is a
    documentation absence, and a probe could show either that it is correct or that RGW has since
    gained support.

How

MinIO and Ceph RGW both run in a container, so those can be a -tags=integration job with a
throwaway endpoint. Wasabi needs a real account — if credentials are not available, say so in the
matrix as "unverified, no endpoint available" rather than inferring from documentation, which is the
state that produced this issue.

Do not use internal/testaws/substrate for this. The whole point is verifying real
implementations; an emulator agreeing with our expectations proves only that the emulator agrees.
Substrate remains the right harness for #282's own unit tests.

Deliverables

  • A compatibility matrix in docs/ recording, per backend: probe result, both conditional forms,
    the exact error codes returned, and the date and endpoint version tested. Version and date matter —
    MinIO's behaviour here is an extension and could change.
  • Any error-code mappings CAS-1: Backend.PutObjectIf — preconditions, sentinel errors, and a capability probe #282 needs, added with a test.
  • A note in the backend documentation stating which backends support coordination features and what
    happens on the ones that do not (refuse to start, never fall back to unconditional).
  • If a backend is found to silently ignore preconditions, that is a finding worth its own
    prominent warning — it is the case a config-flag approach would never catch.

Acceptance criteria

  • MinIO verified against a real endpoint: both conditional forms, concurrent-create, stale-ETag,
    absent-key, error codes, multipart ETag reuse
  • Wasabi verified, or explicitly recorded as unverifiable with the reason
  • Ceph RGW probed if reachable; matrix row updated from documentation-absence to a probe result
  • CAS-1: Backend.PutObjectIf — preconditions, sentinel errors, and a capability probe #282's capability probe confirmed correct on every endpoint tested
  • Matrix committed under docs/ with dates and endpoint versions
  • Any needed error-code mappings landed with tests
  • Backend docs state the degradation rule plainly

Dependencies

Blocked by #282 (the probe and the error mapping are what this verifies).

Reference: docs/design/conditional-writes-vs-raft.md §4.

Activity

  1. added
    type: testing
    priority: medium
    area: s3
    area: tests
    effort: medium
    on Aug 3, 2026
  2. scttfrdmn commented on Aug 8, 2026

    @scttfrdmn
    OwnerAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: s3area: testseffort: mediumpriority: mediumtype: testing

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions