From ec2eb93aeb494dfa87a44c0bf9dc0065625f7132 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 30 Nov 2026 14:54:12 -0800 Subject: [PATCH] storage: batch filled chunk coverage into one publication --- .../core/storage/chunk_local_mutation.go | 41 ++-- .../core/storage/chunk_local_mutation_test.go | 191 ++++++++++++++++++ .../docs/design/chunk-local-mutations.md | 5 +- seaweed-block/docs/design/invariants.md | 2 +- .../docs/design/model-code-trace-coverage.tsv | 4 +- 5 files changed, 226 insertions(+), 17 deletions(-) diff --git a/seaweed-block/core/storage/chunk_local_mutation.go b/seaweed-block/core/storage/chunk_local_mutation.go index a4c806bbb9..b41d39352b 100644 --- a/seaweed-block/core/storage/chunk_local_mutation.go +++ b/seaweed-block/core/storage/chunk_local_mutation.go @@ -19,7 +19,7 @@ func (e *ChunkCoverageRangeError) Error() string { // It must not hold the chunk layer's state mutex across this call. An error // never grants permission to discard bytes. func (s *WALStore) ClearChunkLocal(chunk uint64) error { - return s.publishChunkLocal(chunk, false) + return s.publishChunksLocal([]uint64{chunk}, false) } // MarkChunkLocal durably marks every block of a completely resolved fill. @@ -28,10 +28,23 @@ func (s *WALStore) ClearChunkLocal(chunk uint64) error { // Extent bytes are synced before the bitmap is persisted. Only success // permits a record page to claim that the whole chunk is local. func (s *WALStore) MarkChunkLocal(chunk uint64) error { - return s.publishChunkLocal(chunk, true) + return s.MarkChunksLocal([]uint64{chunk}) } -func (s *WALStore) publishChunkLocal(chunk uint64, all bool) error { +// MarkChunksLocal syncs the batch's extent bytes and makes one durable bitmap +// publication for all its completely resolved chunks. Every chunk must meet +// MarkChunkLocal's admission requirements until publication returns. Validate +// the whole batch before changing memory; an empty batch is a no-op. Duplicate +// indexes are harmless. Until preparation is proportional to changed pages, +// callers must batch fills on their record-page schedule, not call per fill. +func (s *WALStore) MarkChunksLocal(chunks []uint64) error { + return s.publishChunksLocal(chunks, true) +} + +func (s *WALStore) publishChunksLocal(chunks []uint64, all bool) error { + if len(chunks) == 0 { + return nil + } s.lifecycleMu.RLock() defer s.lifecycleMu.RUnlock() s.mu.Lock() @@ -53,9 +66,11 @@ func (s *WALStore) publishChunkLocal(chunk uint64, all bool) error { s.mu.Unlock() return ErrChunkCoverageUnavailable } - if chunk >= uint64(len(v.mapEntries)) { - s.mu.Unlock() - return &ChunkCoverageRangeError{Chunk: chunk, Chunks: uint64(len(v.mapEntries))} + for _, chunk := range chunks { + if chunk >= uint64(len(v.mapEntries)) { + s.mu.Unlock() + return &ChunkCoverageRangeError{Chunk: chunk, Chunks: uint64(len(v.mapEntries))} + } } if d.BaseState != BaseNone { s.mu.Unlock() @@ -65,13 +80,15 @@ func (s *WALStore) publishChunkLocal(chunk uint64, all bool) error { s.mu.Unlock() return err } - bits := noChunkLocalBits - if all { - cb := v.ownedMap.chunkBlocks - blocks := min(cb, s.sb.VolumeSize/uint64(s.sb.BlockSize)-chunk*cb) - bits = &chunkLocalBits{blocks: blocks, all: true} + for _, chunk := range chunks { + bits := noChunkLocalBits + if all { + cb := v.ownedMap.chunkBlocks + blocks := min(cb, s.sb.VolumeSize/uint64(s.sb.BlockSize)-chunk*cb) + bits = &chunkLocalBits{blocks: blocks, all: true} + } + v.mapEntries[chunk].Local = bits } - v.mapEntries[chunk].Local = bits proof := v.mapProof.snapshotV3() recoveryGen := v.recoverGen.Load() s.mu.Unlock() diff --git a/seaweed-block/core/storage/chunk_local_mutation_test.go b/seaweed-block/core/storage/chunk_local_mutation_test.go index 3577cf2e47..86ce5d041f 100644 --- a/seaweed-block/core/storage/chunk_local_mutation_test.go +++ b/seaweed-block/core/storage/chunk_local_mutation_test.go @@ -3,8 +3,11 @@ package storage import ( "bytes" "context" + "crypto/sha256" "errors" "testing" + + "github.com/seaweedfs/seaweed-block/core/chunkkernel" ) func TestClearChunkLocalIsDurableBeforeReturn(t *testing.T) { @@ -33,6 +36,13 @@ func TestClearChunkLocalIsDurableBeforeReturn(t *testing.T) { if held.proof.validV3(s.v3.mapProof) { t.Error("a candidate prepared before clear can resurrect the local bits") } + before := s.v3.pub.current() + if _, err := s.v3.pub.publishMapV3(&s.mu, nil, held, func(*descriptorV3) error { return nil }); !errors.Is(err, ErrMapCoverageStale) { + t.Fatalf("pre-clear candidate was not refused: %v", err) + } + if s.v3.pub.current() != before { + t.Fatal("pre-clear candidate changed durable authority") + } // Recover, rather than Close/final flush, must already observe the clear. if _, err := s.Recover(); err != nil { t.Fatal(err) @@ -57,6 +67,187 @@ func TestClearChunkLocalIsDurableBeforeReturn(t *testing.T) { } } +func TestCrashAfterAbsentPageBeforeClearKeepsBytesAndLaterWrite(t *testing.T) { + for _, dropBeforeClear := range []bool{false, true} { + name := "bytes-retained" + if dropBeforeClear { + name = "drop-before-clear-control" + } + t.Run(name, func(t *testing.T) { + s, path := newMappedCheckpointStoreV3(t) + s.HoldExtentDrainUntilChunkLayer() + if _, err := s.Recover(); err != nil { + t.Fatal(err) + } + if err := s.InitializeChunkCoverage(context.Background(), 7, func(uint64, uint64) (ChunkCoverageSeed, error) { + return ChunkCoverageSeed{All: true}, nil + }, coverageNoPages); err != nil { + t.Fatal(err) + } + s.drainHeld.Store(false) + var image []byte + for lba := uint32(0); lba < 4; lba++ { + block := blk(byte(lba + 1)) + image = append(image, block...) + if err := s.writeExtentUnlocked(lba, block); err != nil { + t.Fatal(err) + } + } + if err := s.MarkChunkLocal(0); err != nil { + t.Fatal(err) + } + pos := uint64(0) + rec := newTestRuntime(t, 16, &pos) + hash := sha256.Sum256(image) + if _, err := rec.Apply(0, chunkkernel.Fill, chunkkernel.Arg{Value: "-"}, &hash); err != nil { + t.Fatal(err) + } + if effect, err := rec.Apply(0, chunkkernel.Evict, chunkkernel.Arg{Value: "-"}, nil); err != nil || effect != chunkkernel.PageBeforeBytes { + t.Fatalf("absent page: %s %v", effect, err) + } + if err := completeChunkRecord(s, rec.dir, 7, 16); err != nil { + t.Fatal(err) + } + if dropBeforeClear { + // Deliberately violate the caller order: the bitmap still says + // local, but remove the bytes before Clear has succeeded. + for lba := uint32(0); lba < 4; lba++ { + if err := s.writeExtentUnlocked(lba, blk(0)); err != nil { + t.Fatal(err) + } + } + if err := s.fd.Sync(); err != nil { + t.Fatal(err) + } + } + // Crash exactly after the absent page, before calling Clear. No + // clean Close or final map publication repairs this window. + crashRecoveryHardeningStore(t, s) + s.mu.Lock() + s.closed = true + s.mu.Unlock() + r, err := openWALStoreV3ForTest(path) + if err != nil { + t.Fatal(err) + } + r.DisableAutoFlushForRecoveryTest() + t.Cleanup(func() { r.Close() }) + if _, err := r.Recover(); err != nil { + t.Fatal(err) + } + loaded, err := loadChunkRecord(rec.dir, 16, true, 7, 0) + if err != nil || !loaded.Complete || loaded.Pages[0] == nil { + t.Fatalf("record reopen: complete=%v err=%v", loaded.Complete, err) + } + if kind, err := chunkRecordKind(loaded.Pages[0].Entries[0].State); err != nil || kind != chunkkernel.Absent { + t.Fatalf("reopened page is not absent: %s %v", kind, err) + } + var reopened []byte + for lba := uint32(0); lba < 4; lba++ { + reopened = append(reopened, readV3(t, r, lba)...) + } + if dropBeforeClear { + if bytes.Equal(reopened, image) { + t.Fatal("bad drop-order control did not expose the missing bytes") + } + return + } + if !bytes.Equal(reopened, image) { + t.Fatal("crash in the absent-page/clear window lost reference bytes") + } + kinds := make([]chunkkernel.Kind, 16) + hashes := make([][32]byte, 16) + for i, entry := range loaded.Pages[0].Entries { + kinds[i], err = chunkRecordKind(entry.State) + if err != nil { + t.Fatal(err) + } + hashes[i] = entry.Hash + } + runtime, err := newChunkRecordRuntime(rec.dir, 16, 7, r.v3.wack.Load, kinds, hashes, []uint64{0}, 0, nil) + if err != nil { + t.Fatal(err) + } + if _, err := r.Write(0, blk(0xe3)); err != nil { + t.Fatal(err) + } + if _, err := r.Sync(); err != nil { + t.Fatal(err) + } + coverage, _, err := r.Coverage(0) + if err != nil || coverage != CoverageAll { + t.Fatalf("write coverage: %v %v", coverage, err) + } + if _, err := runtime.Apply(0, chunkkernel.Write, chunkkernel.Arg{Value: "all"}, nil); err != nil || runtime.Kind(0) != chunkkernel.Unknown { + t.Fatalf("later write did not yield U: %s %v", runtime.Kind(0), err) + } + if !bytes.Equal(readV3(t, r, 0), blk(0xe3)) { + t.Fatal("later acknowledged write lost its exact bytes") + } + }) + } +} + +func TestMarkChunksLocalPublishesOncePerRestoreBatch(t *testing.T) { + s, _ := newMappedCheckpointStoreV3(t) + s.HoldExtentDrainUntilChunkLayer() + if _, err := s.Recover(); err != nil { + t.Fatal(err) + } + if err := s.InitializeChunkCoverage(context.Background(), 7, func(uint64, uint64) (ChunkCoverageSeed, error) { + return ChunkCoverageSeed{}, nil + }, coverageNoPages); err != nil { + t.Fatal(err) + } + api, ok := any(s).(interface{ MarkChunksLocal([]uint64) error }) + if !ok { + t.Fatal("store has no batched durable MarkChunksLocal boundary") + } + s.drainHeld.Store(false) + const restored, batch = 15, 4 + before := s.v3.pub.current().MapGeneration + for start := uint64(0); start < restored; start += batch { + var chunks []uint64 + for chunk := start; chunk < min(start+batch, restored); chunk++ { + chunks = append(chunks, chunk) + for block := uint64(0); block < 4; block++ { + if err := s.writeExtentUnlocked(uint32(chunk*4+block), blk(byte(chunk+1))); err != nil { + t.Fatal(err) + } + } + } + if err := api.MarkChunksLocal(chunks); err != nil { + t.Fatal(err) + } + } + if publications := s.v3.pub.current().MapGeneration - before; publications != (restored+batch-1)/batch { + t.Fatalf("%d restored chunks in batches of %d made %d publications", restored, batch, publications) + } + beforeEmpty := s.v3.pub.current() + if err := api.MarkChunksLocal(nil); err != nil || s.v3.pub.current() != beforeEmpty { + t.Fatalf("empty batch published or refused: %v", err) + } + if _, err := s.Recover(); err != nil { + t.Fatal(err) + } + for chunk := uint64(0); chunk < restored; chunk++ { + if got, _, err := s.Coverage(chunk); err != nil || got != CoverageAll { + t.Fatalf("restored chunk %d: coverage=%v err=%v", chunk, got, err) + } + if !bytes.Equal(readV3(t, s, uint32(chunk*4)), blk(byte(chunk+1))) { + t.Fatalf("restored bytes lost in chunk %d", chunk) + } + } + beforeInvalid := s.v3.pub.current() + var bounds *ChunkCoverageRangeError + if err := api.MarkChunksLocal([]uint64{15, 16}); !errors.As(err, &bounds) { + t.Fatalf("invalid batch: %v", err) + } + if got, _, err := s.Coverage(15); err != nil || got != CoverageNone || s.v3.pub.current() != beforeInvalid { + t.Fatalf("invalid batch partly applied: coverage=%v err=%v", got, err) + } +} + func TestMarkChunkLocalSyncsBytesBeforePublishingCoverage(t *testing.T) { s, path := newMappedCheckpointStoreV3(t) s.HoldExtentDrainUntilChunkLayer() diff --git a/seaweed-block/docs/design/chunk-local-mutations.md b/seaweed-block/docs/design/chunk-local-mutations.md index f65514b64e..126bbd32f8 100644 --- a/seaweed-block/docs/design/chunk-local-mutations.md +++ b/seaweed-block/docs/design/chunk-local-mutations.md @@ -5,6 +5,7 @@ Signatures confirmed: ```go func (s *WALStore) ClearChunkLocal(chunk uint64) error func (s *WALStore) MarkChunkLocal(chunk uint64) error +func (s *WALStore) MarkChunksLocal(chunks []uint64) error ``` Success is immediate durable map publication, not a promise to publish at the next checkpoint. Methods take store/lifecycle locks internally; the caller must not hold stMu. Uninitialized/unrecovered coverage returns ErrChunkCoverageUnavailable. Out-of-range returns *ChunkCoverageRangeError. A publication error is not permission to drop bytes or claim durable all-local coverage. @@ -13,8 +14,8 @@ Clear: caller establishes that the chunk equals its current HEAD reference and e The crash window between absent record page and durable map clear retains the old bytes. The old bitmap may still say local, but those bytes have not been discarded and still equal the admitted reference. Safety does not depend on the loader overriding bitmap authority using an absent page. After the clear is durable, leftover physical bytes are harmless; their local bits are absent. A failed clear leaves bytes in place; retry/reopen is required. -Mark: caller has resolved a current fill, installed every missing extent block with local writes winning, and excluded stale fill/eviction. The store syncs the extent before persisting the all-local bitmap and returns only after the sole descriptor publisher syncs the new map tuple. Only then may a record page durably claim whole-local. A crash before successful publication repeats a fetch conservatively; it never authorizes bitmap bits over unsynced bytes. The final short chunk uses its actual block count. +Mark: caller has resolved every fill in the batch, installed every missing extent block with local writes winning, and excluded stale fill/eviction. MarkChunksLocal syncs all the batch extents before persisting their all-local bitmaps in ONE map publication, then returns after the sole descriptor publisher syncs the new tuple. Validate the entire batch before changing memory; an invalid member changes none. Empty batches do nothing and duplicate indexes are harmless. MarkChunkLocal delegates to the same batch boundary with one index. Only then may a record page durably claim whole-local. A crash before successful publication repeats a fetch conservatively; it never authorizes bitmap bits over unsynced bytes. The final short chunk uses its actual block count. 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. -Cost limit: the current shared map preparer still copies/validates the full map per publication. 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. +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 remains per eviction. 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. diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index 94093deae4..4670621fb8 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -626,7 +626,7 @@ The "Machine / transition" column refers to Part A. Notes under a table record w | `INV-CHUNK-RECORD-PAYLOAD-001` | Persisting and loading a chunk record preserves every entry's state and hash, including entries on either side of a segment boundary. | M1 chunk record codec (caller not wired) | `core/storage/chunk_record.go` `encodeChunkRecordPage`, `decodeChunkRecordPage` | `TestRecordEntryPayloadRoundTripsAcrossSegments` (`core/storage/chunk_record_test.go`; state-zero and one-entry hash-drop controls) | Encoding fidelity; no state transition change | STUB | | `INV-CHUNK-COVERAGE-RETAINED-001` | A coverage-map baseline is installed by recovery only when every chunk position is at or below the retained WAL frontier; a discarded suffix cannot regain local bits through later LSN reuse. | M1 recovery (caller not wired) | `core/storage/walstore_v3.go` `WALStore.recoverV3` | `TestChunkCoverageBaselineCannotOutliveItsRetainedWAL` | SlotFence2 position-check premise; storage component guard | STUB | | `INV-CHUNK-LOCAL-COVERAGE-001` | Coverage returns local none/some/all and the chunk position from one observation; it is unavailable until successful recovery and bitmap initialization. | M1 chunk bitmap (caller not wired) | `core/storage/chunk_coverage.go` `WALStore.Coverage`, `WALStore.InitializeChunkCoverage` | `TestChunkCoverageBaselineCannotOutliveItsRetainedWAL`, `TestChunkCoverageAdmissionPrecedesSeed`, `TestChunkCoverageInitializesEmptyWithoutFabricatingLocalBlocks`, `TestChunkCoverageAcknowledgedWriteSurvivesReplay`, `TestChunkCoverageCheckpointKeepsAllAcrossAPageBoundary`, `TestChunkCoverageRequiresSuccessfulRecovery` (`core/storage/chunk_coverage_test.go`) | MoveWide2 durable per-block map premise; SlotFence publication | STUB | -| `INV-CHUNK-LOCAL-MUTATION-001` | A successful local clear or mark has synced its map publication; marking all-local syncs extent bytes first. A failed publication grants no permission to drop bytes or persist an all-local record. | M1 chunk bitmap mutation (caller not wired) | `core/storage/chunk_local_mutation.go` `ClearChunkLocal`, `MarkChunkLocal`, `publishChunkLocal` | `TestClearChunkLocalIsDurableBeforeReturn`, `TestMarkChunkLocalSyncsBytesBeforePublishingCoverage`, `TestMarkChunkLocalRefusesFailedExtentSyncBeforeMapIO`, `TestChunkLocalMutationRefusesUnavailableBoundsAndMapFailure` | MoveWide2.Fill/Evict/Drop; caller admission and page-before-drop remain caller obligations | STUB | +| `INV-CHUNK-LOCAL-MUTATION-001` | A successful local clear or mark has synced its map publication; marking all-local syncs extent bytes first. A failed publication grants no permission to drop bytes or persist an all-local record. | M1 chunk bitmap mutation (caller not wired) | `core/storage/chunk_local_mutation.go` `ClearChunkLocal`, `MarkChunksLocal`, `publishChunksLocal` | `TestCrashAfterAbsentPageBeforeClearKeepsBytesAndLaterWrite`, `TestMarkChunksLocalPublishesOncePerRestoreBatch`, `TestClearChunkLocalIsDurableBeforeReturn`, `TestMarkChunkLocalSyncsBytesBeforePublishingCoverage`, `TestMarkChunkLocalRefusesFailedExtentSyncBeforeMapIO`, `TestChunkLocalMutationRefusesUnavailableBoundsAndMapFailure` | MoveWide2.Fill/Evict/Drop; caller admission and page-before-drop remain caller obligations | STUB | | `INV-CHUNK-LOCAL-EPOCH-001` | After a format marker, initialization never reads legacy presence: the same epoch rebuilds pages from the bitmap; another epoch is refused without changing storage. | M1 bitmap initialization (caller not wired) | `core/storage/chunk_coverage.go` `WALStore.InitializeChunkCoverage` | `TestChunkCoverageLegacyFenceCannotRelabelAnInitializedEpoch`, `TestChunkCoverageMarkedEpochNeverReseedsPresence`, `TestChunkCoverageMarkerWithoutBitmapCannotReadPresence` (`core/storage/chunk_coverage_test.go`) | SlotFence marker authority; UpgradeWide3 | STUB | | `INV-CHUNK-HALF-FENCE-FALLBACK-001` | A damaged selected marked map may fall back only on integrity-only errors, to an intact valid unmarked slot of the same store incarnation; two marked slots never authorize fallback. Each successful fallback reports a typed event and one process-local counter increment. | M1 half-fence open (caller not wired) | `core/storage/walstore_v3.go` `openWALStoreV3File`, `coverageHalfFenceFallbackEligible` | `TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot`, `TestChunkCoverageBothMarkedDamagedMapNeverFallsBack` (`core/storage/chunk_coverage_test.go`) | SlotFence2.OpenNew | STUB | | `INV-WAL-V3-DESCRIPTOR-SELECT-001` | Of the two v3 descriptor slots, open selects the valid selectable slot with the higher slotGen, and never a prepared migration slot. | M1 Opened (v3 descriptor selection) | `core/storage/superblock_v3.go` `selectSlotV3` | `TestSlotV3Selection` (`core/storage/superblock_v3_test.go`); `TestWALStoreV3CloseKeepsTheNewestSlotAAndItsW` (`core/storage/walstore_close_v3_test.go`) | — | ACTIVE | diff --git a/seaweed-block/docs/design/model-code-trace-coverage.tsv b/seaweed-block/docs/design/model-code-trace-coverage.tsv index 2eab377034..e8aa1a910c 100644 --- a/seaweed-block/docs/design/model-code-trace-coverage.tsv +++ b/seaweed-block/docs/design/model-code-trace-coverage.tsv @@ -9,5 +9,5 @@ SlotFence uncertain publication resumes only after reopen and recovery core/stor SlotFence BASE and reset exclude upgrade before callback or publication core/storage/chunk_coverage.go:WALStore.InitializeChunkCoverage core/storage/chunk_coverage_test.go:TestChunkCoverageInitializationRefusesActiveBaseBeforeWriting STUB SlotFence2 intact unmarked half-fence fallback only, typed event and process counter core/storage/walstore_v3.go:openWALStoreV3File; core/storage/walstore_v3.go:coverageHalfFenceFallbackEligible core/storage/chunk_coverage_test.go:TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot; core/storage/chunk_coverage_test.go:TestChunkCoverageBothMarkedDamagedMapNeverFallsBack; core/storage/chunk_coverage_test.go:TestChunkCoverageFallbackRequiresIntegrityOnlyErrorTree; core/storage/chunk_coverage_test.go:TestChunkCoverageFallbackAuthorityGuards; core/storage/chunk_coverage_test.go:TestChunkCoverageFallbackRefusesUnavailableOtherDependencies STUB -MoveWide2 Fill: durable bytes before local bitmap core/storage/chunk_local_mutation.go:WALStore.MarkChunkLocal core/storage/chunk_local_mutation_test.go:TestMarkChunkLocalSyncsBytesBeforePublishingCoverage; core/storage/chunk_local_mutation_test.go:TestMarkChunkLocalRefusesFailedExtentSyncBeforeMapIO STUB -MoveWide2 Evict/Drop: durable clear before caller drops bytes core/storage/chunk_local_mutation.go:WALStore.ClearChunkLocal core/storage/chunk_local_mutation_test.go:TestClearChunkLocalIsDurableBeforeReturn; core/storage/chunk_local_mutation_test.go:TestChunkLocalMutationRefusesUnavailableBoundsAndMapFailure STUB +MoveWide2 Fill: durable bytes before local bitmap core/storage/chunk_local_mutation.go:WALStore.MarkChunksLocal core/storage/chunk_local_mutation_test.go:TestMarkChunksLocalPublishesOncePerRestoreBatch; core/storage/chunk_local_mutation_test.go:TestMarkChunkLocalSyncsBytesBeforePublishingCoverage; core/storage/chunk_local_mutation_test.go:TestMarkChunkLocalRefusesFailedExtentSyncBeforeMapIO STUB +MoveWide2 Evict/Drop: durable clear before caller drops bytes core/storage/chunk_local_mutation.go:WALStore.ClearChunkLocal core/storage/chunk_local_mutation_test.go:TestCrashAfterAbsentPageBeforeClearKeepsBytesAndLaterWrite; core/storage/chunk_local_mutation_test.go:TestClearChunkLocalIsDurableBeforeReturn; core/storage/chunk_local_mutation_test.go:TestChunkLocalMutationRefusesUnavailableBoundsAndMapFailure STUB