Skip to content

conditional DeleteObject (If-Match) is atomic only within a single erasure set #144

Closed

Description

@Vonng

Deferred from #10 (agreed by the maintainer and the Codex reviewer). #10 implemented conditional DeleteObject (If-Match → 412 / preserve) with the precondition evaluated at the server-pool layer, under the NS write lock, against the version that will actually be removed. That check-then-delete is atomic for a single erasure set (one server pool) — the default deployment — but not across multiple server pools. This mirrors #120→#133 (single-pool now, multi-pool tracked separately).

Multi-pool gaps (out of #10's scope)

  1. Lock identity. erasureServerPools.DeleteObject takes z.NewNSLock (pool 0 / set 0), while erasureObjects.PutObject takes the destination erasure set's lock. These share a lock namespace only within one erasure set; local multi-pool deployments have separate mutex maps, so a concurrent PUT into another pool/set can commit a new ETag between the DELETE's ETag check and the delete → a mismatched If-Match can delete the wrong (newer) version (TOCTOU).

  2. Cross-pool resurrection / suppressed failures. deleteObjectFromAllPools checks and deletes each pool independently and returns only derrs[0]. With the same key split across pools (older ETag A in one, latest B in another — a data-movement / split state), an If-Match: B DELETE can delete B, reject A, return 204, and leave A readable again; a non-first-pool quorum error can be hidden behind 204.

  3. Cross-pool version selection. For a no-versionId DELETE the condition is evaluated against pinfo.ObjInfo (latest); with versions split across pools the wrong pool's copy can be compared.

Suggested direction

Make the conditional delete authoritative across server pools: a pools-layer lock (or resync/consistency mechanism) that also serialises with the write paths across pools, per-pool result aggregation that governs the logical delete before any per-pool cleanup, and cross-pool version selection. This is a general multi-pool replica/delete concern, related to #133's multi-pool lock work.

Acceptance criteria

  • A concurrent cross-pool PUT cannot cause a mismatched If-Match DELETE to remove a newer version (no TOCTOU across pools).
  • A key split across pools cannot resurrect a stale version or suppress a per-pool failure behind a 204 on conditional delete.
  • The If-Match comparison targets the correct version across pools for both no-versionId and explicit-versionId deletes.
  • Deterministic multi-pool regressions for each.

Non-goals

Activity

  1. moved this from Backlog to In progress in Siloon Sep 11, 2026
  2. moved this from In progress to Done in Siloon Sep 11, 2026
  3. Vonng commented on Sep 15, 2026

    @Vonng
    MemberAuthor

    This issue's conditional DELETE defects were fixed in PR #178, merged as 12f631b502f3.

    The condition is evaluated once against the logical object version while holding the pools-layer lock shared with writes. Deletion reconciles the relevant pool copies, and cleanup failures are returned to the caller. The tests cover concurrent mutations, stale copies and both current-version and explicit-version selection. PR #188 subsequently extended reconciliation to ordinary single-object version DELETE.

    The separate cross-pool conditional PUT defect remains open and is tracked in #199.

    Documentation: Conditional DELETE design and September status update and current multi-pool behavior and release status.

    As of September 16, the DELETE fixes are included in main at 40220bd836cb, but not in the latest published Server, RELEASE.2026-09-03T13-18-01Z. Final release acceptance is tracked in #203.

  4. added
    bug
    on Sep 15, 2026
  5. self-assigned this
    on Sep 15, 2026
  6. added theissue type on Sep 15, 2026
  7. added this to the 20260916 milestone on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions