Skip to content

[P2] Multi-pool: replica-write Object Lock reconciliation is not authoritative across server pools #133

Closed

Description

@Vonng

Problem

Making a replica object write's Object Lock reconciliation authoritative across server pools is not solved by the per-set write lock, and it is a general multi-pool replica-write concern, not specific to any one replication path. It was isolated while narrowing #120 (SSE-C replica retransmit), whose single-erasure-set reconcile is correct and shipped; the multi-pool cases below were deliberately left out of that fix.

When a bucket spans more than one server pool, a version can have copies in more than one pool, and lock-metadata mutations and full replica writes do not share one serialization boundary. Three concrete failures (all observed by adversarial review of the #120 branch, all strictly multi-pool):

  1. Wrong lock boundary. A full replica write commits under the receiving set's namespace lock, but PutObjectMetadata (the path PutObjectRetention/PutObjectLegalHold replication uses) takes pool 0's z.NewNSLock and passes NoLock=true downstream. So a retransmit holding pool 1's lock is not mutually excluded from a concurrent replicated legal-hold/retention update; it can read OFF@09:00, let ON@10:00 commit, then overwrite OFF@09:00.
  2. ModTime does not track lock state. Retention and legal hold carry independent reserved ordering timestamps and can change without changing object ModTime. A cross-pool resolver that picks one record by ModTime (lowest pool index on a tie) can return the older lock, and the newest retention and legal hold can even live in different pools.
  3. Stale copy stays authoritative for reads. A retransmit that correctly commits ON@10:00 into pool 1 leaves the OFF@09:00 copy in pool 0; a replica write preserves the source ModTime, and normal reads break an equal-ModTime tie by lowest pool index, so reads still return OFF. Tag updates have the same shape.

Impact

In a multi-pool, active-active deployment, a legal-hold or retention update racing a full replica write of the same version can be lost or shadowed. Narrow (needs multi-pool + active-active + a concurrent lock update in the window), but a legal-hold rollback is a WORM/compliance concern. Single-server-pool deployments are unaffected: a version hashes to exactly one erasure set, so there is one authoritative copy and no cross-pool tie.

Direction (not a committed design)

A correct fix likely needs, together:

  • A shared pools-layer object lock held across the destination-version resolution, the reconcile, and the commit, that also serializes with the lock-metadata mutation paths (PutObjectMetadata/PutObjectTags), with a consistent lock order.
  • Per-field cross-pool resolution: resolve retention and legal hold independently by their reserved ordering timestamps across all pools (including timestamp-only removals), not by object ModTime.
  • Cross-pool replacement/retirement so the version that normal reads select is the reconciled one, retiring or updating competing copies under the shared lock.

This is a distributed-systems change to the server-pool write/complete paths and is largely independent of SSE-C. It should be designed with the existing multi-pool duplicate-version and PutObjectMetadata locking model in mind.

Acceptance

  • A replica full write (PUT and multipart completion) of a version whose newer legal hold / retention landed in another pool between resolution and commit does not roll it back, under a shared lock that also excludes the metadata-mutation paths.
  • Retention and legal hold are each resolved by their own ordering timestamp across pools; equal object ModTime with different per-field winners is handled.
  • After a successful replica write, the reconciled version is what the pooled read API returns (no stale other-pool copy shadowing it on an equal-ModTime tie).
  • Deterministic two-pool object-layer fixtures (using prepareErasurePools) cover each case, including a sole owner marked decommissioning/rebalancing and an upload persisted before any routing change.

Related

Isolated while narrowing #120 (which ships the single-erasure-set reconcile). Depends on the same Object Lock ordering as #111. Interacts with the general multi-pool duplicate-version handling in erasureServerPools.

Activity

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

    @Vonng
    MemberAuthor

    Resolution update: PR #178, merged as 12f631b502f3, addressed the cross-pool consistency defects reported here. Replica writes and metadata updates share the pools-layer object lock; ordered metadata fields are reconciled independently across copies of the addressed version; competing copies are retired after replacement commits, so a stale copy cannot continue to shadow the reconciled state.

    A subsequent review found a tag-preservation regression in that implementation. PR #189 (d848fb52b58a) fixes it by taking the tag value from ObjectInfo.UserTags and carrying that value together with its revision timestamp through reconciliation. Builds containing #178 alone should therefore include #189 as well.

    Both repairs are present in main at 40220bd836cb. The regression coverage includes real two-pool storage fixtures, concurrent metadata mutations, replica PUT/multipart paths, and persisted tag values and timestamps. Previously lost tag values still require restoration from a trusted source; upgrading does not reconstruct their history.

    Documentation: Multi-pool repairs, upgrade behavior and release status. As of September 16, these changes are not included in the latest published Server, RELEASE.2026-09-03T13-18-01Z; final release acceptance is tracked in #203.

  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