diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index a1e1dc0686..00695c83b4 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -657,7 +657,7 @@ Notes: Notes: -- `INV-LIFECYCLE-STORE-DURABLE-001` open gaps: `FileStore.putLocked` (`core/lifecycle/store.go`) and `PlacementIntentStore.putLocked` (`core/lifecycle/placement_intent.go`) still remove the previous file before rename and do not fsync the replacement or its directory. The current enforcement and crash controls cover node inventory only; the other stores require separate fixes. +- `INV-LIFECYCLE-STORE-DURABLE-001` open gaps: `FileStore.putLocked` (`core/lifecycle/store.go`) and `PlacementIntentStore.putLocked` (`core/lifecycle/placement_intent.go`) still remove the previous file before rename and do not fsync the replacement or its directory. The current enforcement and crash controls cover node inventory puts only; the other stores require separate fixes. A failed put may still be on disk: if directory fsync fails after rename, restart can load the new record. `NodeInventoryStore.RemoveNode` does not fsync its directory after deletion, so a removed node can reappear after a crash. - `INV-AUTH-PERSIST-BEFORE-PUBLISH-001`: a failed write's durable outcome may be unknown (the record may have landed); for a workspace volume the failure latches uncertainty (`INV-AUTH-UNCERTAIN-001`). The cited test covers the non-workspace in-memory rollback. - `INV-AUTH-UNCERTAIN-001`: The cited test asserts the refusal after an unknown-outcome lease extension (rename landed, directory sync failed): the next renewal, a revocation and an endpoint change are all refused. The TLA+ configuration `S5_red_noUncertain` violates `UniqueEpoch` without it. A Revoking lease still gets its bounded drain reply, min(horizon, deadline), never extended: see M2 any (workspace) → Uncertain. A failed move on an uncertain volume is answered as an unknown outcome before any admission refusal, the request's own cancellation or deadline stays typed, and an issued move's replay still returns its stored grant: see M2 Uncertain → Uncertain (move answer). The renewal path reads uncertainty from the lease view (`INV-LEASE-VIEW-001`), not from `persistWorkspaceLocked`. - `INV-WS-LEASE-HORIZON-001`: The forced-barrier argument (a renewal that reads its clock after the barrier has read the deadline is refused) assumes nondecreasing master time. That is an assumption of the current `WorkspaceTakeover` model, whose `Tick` and `SlowTick` actions only advance `now`; it is not a consequence of `time.Now` carrying a monotonic reading, because persisted `UnixNano` deadlines are compared as wall-clock values. The existing deadline check stays alongside the horizon. The model still renews with `exp = deadline = now + TTL`; the horizon/grant split is a pending specification update (Part C rule 2).