docs: distinguish coverage validation and latched publication errors

This commit is contained in:
pingqiu committed 2026-11-30 15:29:21 -08:00
1 parent 5086b16877
commit d8bfc6f958
1 file changed
+3 -1
@@ -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.