From d8bfc6f9586770141dfbacb3ee66ed278bda86cd Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 30 Nov 2026 15:29:21 -0800 Subject: [PATCH] docs: distinguish coverage validation and latched publication errors --- seaweed-block/docs/design/chunk-local-mutations.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/seaweed-block/docs/design/chunk-local-mutations.md b/seaweed-block/docs/design/chunk-local-mutations.md index bd2fbfaca5..ab5457071a 100644 --- a/seaweed-block/docs/design/chunk-local-mutations.md +++ b/seaweed-block/docs/design/chunk-local-mutations.md @@ -18,6 +18,8 @@ Mark: caller has resolved every fill in the batch, installed every missing exten Both operations preserve the chunk's LSN, checkpoint and log tail; no acknowledged write is discarded by the store boundary itself. The caller's clean-eviction admission is mandatory. Concurrent Recover is checked with the existing generation/proof and leader rules. The new methods do not write record pages or activate the draft format. -Memory changes before durable publication. An error can therefore leave memory and disk different until a retry or later checkpoint. After a failed Clear, memory says absent while the caller retains the bytes, so reads can fetch remotely. After a failed Mark, memory says local over installed bytes, and any later publication syncs those extents before publishing the bits. Repeating either operation is idempotent; an error still grants no permission to discard bytes or claim durable coverage. +Validation refusals before mutation, including an invalid batch or an in-progress BASE install, leave coverage unchanged. Memory changes before durable publication, so an error after mutation can leave memory and disk different. After a failed Clear, memory says absent while the caller retains the bytes, so reads can fetch remotely. After a failed Mark, memory says local over installed bytes, and any later publication syncs those extents before publishing the bits. A retryable preparation/refusal can converge through an idempotent retry or later checkpoint. A latched extent-sync or uncertain descriptor-publication fault requires reopen and recovery; the faulted open refuses further mutations, checkpoints and coverage reads. An error still grants no permission to discard bytes or claim durable coverage. + +The extent-sync failure control observes map sync and descriptor publication, not the first map write. Its coverage does not independently prove the absence of earlier map writes; extent sync precedes map preparation in the production call order. Cost limit: the current shared map preparer still copies/validates the full map per publication. Until that work is proportional to changed pages, callers batch on the record-page schedule: at most ceil(N/B) publications for N restored chunks in batches of B, then persist those record pages. Clear also publishes the whole map once per eviction. No production eviction caller is wired here; a future eviction driver may call it per chunk only after checkpoint work is proportional to changed pages, or must gain a batch boundary first. Fixed-size batching amortizes the work; its current cost is still O(S * ceil(N/B)), not a claimed linear restore. This small prerequisite exposes the correct durable boundary first; the checkpoint-by-changed-pages work owns removal of the O(S) work. No proportional-cost or stop-time claim here.