Repository navigation
Description
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):
- Wrong lock boundary. A full replica write commits under the receiving set's namespace lock, but
PutObjectMetadata(the pathPutObjectRetention/PutObjectLegalHoldreplication uses) takes pool 0'sz.NewNSLockand passesNoLock=truedownstream. So a retransmit holding pool 1's lock is not mutually excluded from a concurrent replicated legal-hold/retention update; it can readOFF@09:00, letON@10:00commit, then overwriteOFF@09:00. - 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 byModTime(lowest pool index on a tie) can return the older lock, and the newest retention and legal hold can even live in different pools. - Stale copy stays authoritative for reads. A retransmit that correctly commits
ON@10:00into pool 1 leaves theOFF@09:00copy in pool 0; a replica write preserves the sourceModTime, and normal reads break an equal-ModTimetie by lowest pool index, so reads still returnOFF. 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
ModTimewith 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-
ModTimetie). - 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
docs: point the multi-pool lock follow-up at #133
docs: point the multi-pool lock follow-up at #133
Vonng commentedon Sep 15, 2026
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 fromObjectInfo.UserTagsand 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.