From a2cd299086732f890f6cf4ffd7debc7f63e770f1 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 30 Nov 2026 08:53:11 -0800 Subject: [PATCH] Recover half-fence map reuse through an intact unmarked slot --- seaweed-block/.github/model-code-trace.tsv | 1 + seaweed-block/core/storage/block_metadata.go | 3 + .../core/storage/chunk_coverage_test.go | 93 ++++++++++++++++++- .../core/storage/chunk_map_extents_v3.go | 14 +-- .../core/storage/recovery_progress.go | 13 +++ seaweed-block/core/storage/walstore_v3.go | 36 +++++++ seaweed-block/docs/design/chunk-coverage.md | 40 ++++++-- seaweed-block/docs/design/invariants.md | 4 +- .../docs/design/model-code-trace-coverage.tsv | 1 + 9 files changed, 186 insertions(+), 19 deletions(-) diff --git a/seaweed-block/.github/model-code-trace.tsv b/seaweed-block/.github/model-code-trace.tsv index c6566b0d00..a32d734bea 100644 --- a/seaweed-block/.github/model-code-trace.tsv +++ b/seaweed-block/.github/model-code-trace.tsv @@ -125,3 +125,4 @@ core/transport/replica.go ReplicationPeer.Rebuild core/transport/replica.go ReplicationPeer.Ship core/storage/chunk_coverage.go SlotFence.Publish core/storage/chunk_coverage_map.go MoveWide2.Write +core/storage/walstore_v3.go SlotFence2.OpenNew diff --git a/seaweed-block/core/storage/block_metadata.go b/seaweed-block/core/storage/block_metadata.go index 33fc39ac8d..9447074afd 100644 --- a/seaweed-block/core/storage/block_metadata.go +++ b/seaweed-block/core/storage/block_metadata.go @@ -46,6 +46,9 @@ type BlockMetadataBinding struct { // on open it must accept exactly the stored version. No registry or hook chain. type BlockMetadataFactory func(BlockMetadataFile, BlockMetadataLayout) (BlockMetadataBinding, error) type WALStoreOptions struct { + // RecoveryEvent observes typed open-time diagnostic decisions synchronously. + // It must not call storage or perform I/O; it authorizes no serving or writes. + RecoveryEvent func(RecoveryEvent) // RecoveryProgress observes validated open-map entries. It may take the // watchdog lock, but must never call back into storage or perform I/O. RecoveryProgress func(RecoveryPhase, uint64) diff --git a/seaweed-block/core/storage/chunk_coverage_test.go b/seaweed-block/core/storage/chunk_coverage_test.go index 2381f09085..2e16996eda 100644 --- a/seaweed-block/core/storage/chunk_coverage_test.go +++ b/seaweed-block/core/storage/chunk_coverage_test.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "errors" "fmt" + "os" "testing" ) @@ -478,7 +479,12 @@ func TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot(t *testing.T) { } return nil } - if err := s.InitializeChunkCoverage(context.Background(), 7, func(uint64, uint64) (ChunkCoverageSeed, error) { return ChunkCoverageSeed{Blocks: []uint64{1}}, nil }, coverageNoPages); err == nil { + if err := s.InitializeChunkCoverage(context.Background(), 7, func(chunk, _ uint64) (ChunkCoverageSeed, error) { + if chunk == 0 { + return ChunkCoverageSeed{Blocks: []uint64{1}}, nil + } + return ChunkCoverageSeed{}, nil + }, coverageNoPages); err == nil { t.Fatal("half fence completed") } marked := s.v3.pub.current() @@ -514,11 +520,15 @@ func TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot(t *testing.T) { if err := oldMap.Close(); err != nil { t.Fatal(err) } - next, err := openWALStoreV3MapInternalForTest(path, true) + var events []RecoveryEvent + next, err := openWALStoreV3WithOptions(path, true, WALStoreOptions{RecoveryEvent: func(event RecoveryEvent) { events = append(events, event) }}) if err != nil { t.Fatalf("intact legacy slot could not reopen after half-fence page reuse: %v", err) } defer next.Close() + if len(events) != 1 || events[0].Kind != RecoveryHalfFenceFallback || events[0].DiscardedSlotGeneration != marked.SlotGen || events[0].SelectedSlotGeneration != legacy.SlotGen || next.ChunkMapStatsV3().HalfFenceFallbacks != 1 { + t.Fatalf("missing typed fallback receipt: events=%+v stats=%+v", events, next.ChunkMapStatsV3()) + } next.DisableAutoFlushForRecoveryTest() next.HoldExtentDrainUntilChunkLayer() if next.v3.pub.current().ChunkStateFormat != 0 { @@ -534,6 +544,33 @@ func TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot(t *testing.T) { if string(got) != string(payload) { t.Fatal("legacy fallback lost acknowledged bytes") } + if err := next.InitializeChunkCoverage(context.Background(), 7, func(chunk, _ uint64) (ChunkCoverageSeed, error) { + if chunk == 0 { + return ChunkCoverageSeed{Blocks: []uint64{1}}, nil + } + return ChunkCoverageSeed{}, nil + }, coverageNoPages); err != nil { + t.Fatalf("upgrade after fallback did not converge: %v", err) + } + if err := next.Close(); err != nil { + t.Fatal(err) + } + again, err := openWALStoreV3WithOptions(path, true, WALStoreOptions{RecoveryEvent: func(event RecoveryEvent) { events = append(events, event) }}) + if err != nil { + t.Fatal(err) + } + defer again.Close() + again.DisableAutoFlushForRecoveryTest() + again.HoldExtentDrainUntilChunkLayer() + if len(events) != 1 || again.ChunkMapStatsV3().HalfFenceFallbacks != 0 { + t.Fatal("normal reopen reported another fallback") + } + if _, err := again.Recover(); err != nil { + t.Fatal(err) + } + if got, err := again.Read(1); err != nil || string(got) != string(payload) { + t.Fatalf("completed upgrade lost acknowledged bytes: %v", err) + } } func TestChunkCoveragePreparedReaderRemainsImmutableAfterWrites(t *testing.T) { @@ -591,3 +628,55 @@ func TestChunkCoverageRejectsRehashedImpossibleBitmapGeometry(t *testing.T) { t.Fatalf("rehashed impossible root answered %v", err) } } + +func TestChunkCoverageBothMarkedDamagedMapNeverFallsBack(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{}, nil }, coverageNoPages); err != nil { + t.Fatal(err) + } + prepared, err := s.prepareOwnedMapCheckpointV3(s.v3.pub.current().MapCoveredCheckpoint) + if err != nil { + t.Fatal(err) + } + if _, err := s.v3.pub.publishMapV3(nil, nil, prepared, nil); err != nil { + t.Fatal(err) + } + marked, other := s.v3.pub.current(), s.v3.pub.other + if marked.ChunkStateFormat == 0 || other.ChunkStateFormat == 0 || marked.MapRootLocator == other.MapRootLocator { + t.Fatal("control did not create two independent marked roots") + } + if err := s.Close(); err != nil { + t.Fatal(err) + } + f, err := os.OpenFile(path+".chunkmap", os.O_RDWR, 0) + if err != nil { + t.Fatal(err) + } + if _, err := f.WriteAt([]byte("BAD!"), int64(marked.MapRootLocator)); err != nil { + f.Close() + t.Fatal(err) + } + if err := f.Sync(); err != nil { + f.Close() + t.Fatal(err) + } + if _, _, err := readChunkLSNMapV3(f, other, 4); err != nil { + f.Close() + t.Fatalf("older marked root not intact: %v", err) + } + if err := f.Close(); err != nil { + t.Fatal(err) + } + events := 0 + next, err := openWALStoreV3WithOptions(path, true, WALStoreOptions{RecoveryEvent: func(RecoveryEvent) { events++ }}) + if next != nil { + next.Close() + } + if !errors.Is(err, ErrMapInvalid) || events != 0 { + t.Fatalf("marked dependency loss was hidden: err=%v events=%d", err, events) + } +} diff --git a/seaweed-block/core/storage/chunk_map_extents_v3.go b/seaweed-block/core/storage/chunk_map_extents_v3.go index 1192da4c9d..9bfe1caeb5 100644 --- a/seaweed-block/core/storage/chunk_map_extents_v3.go +++ b/seaweed-block/core/storage/chunk_map_extents_v3.go @@ -36,11 +36,12 @@ type mapRootExtentsV3 struct { // chunkMapLiveV3 is the live set of one owned map. type chunkMapLiveV3 struct { - roots map[mapRootKeyV3]mapRootExtentsV3 - inflight map[mapRootKeyV3]bool - truncations atomic.Uint64 - priorRefused atomic.Uint64 // prepares refused because their prior root was released - fileBytes atomic.Uint64 // set at open, after each prepare and truncation + roots map[mapRootKeyV3]mapRootExtentsV3 + inflight map[mapRootKeyV3]bool + truncations atomic.Uint64 + priorRefused atomic.Uint64 // prepares refused because their prior root was released + halfFenceFallbacks atomic.Uint64 // successful opens selecting an intact unmarked slot + fileBytes atomic.Uint64 // set at open, after each prepare and truncation } // ChunkMapStats reports the owned map file's size, the bytes its live roots @@ -48,6 +49,7 @@ type chunkMapLiveV3 struct { // prepares were refused because their prior root had been released. type ChunkMapStats struct { FileBytes, LiveBytes, Truncations, PriorReleased uint64 + HalfFenceFallbacks uint64 // since this process opened the store; not a replay/ready count } // registerRootV3 records a slot-named root read at open. Caller holds no lock @@ -222,7 +224,7 @@ func (a *extentAllocatorV3) alloc(n uint64) uint64 { // bytes are computed on demand from a snapshot. func (m *chunkLSNMapV3) Stats() ChunkMapStats { _, live := usedPagesV3(m.liveSnapshotV3()) - return ChunkMapStats{FileBytes: m.live.fileBytes.Load(), LiveBytes: live, Truncations: m.live.truncations.Load(), PriorReleased: m.live.priorRefused.Load()} + return ChunkMapStats{FileBytes: m.live.fileBytes.Load(), LiveBytes: live, Truncations: m.live.truncations.Load(), PriorReleased: m.live.priorRefused.Load(), HalfFenceFallbacks: m.live.halfFenceFallbacks.Load()} } // ChunkMapStatsV3 reports the owned map file's bounded-growth counters, or diff --git a/seaweed-block/core/storage/recovery_progress.go b/seaweed-block/core/storage/recovery_progress.go index 00acaf4ba6..5dd5cbc9b0 100644 --- a/seaweed-block/core/storage/recovery_progress.go +++ b/seaweed-block/core/storage/recovery_progress.go @@ -25,6 +25,19 @@ const ( RecoveryAttach ) +// RecoveryEventKind names a diagnostic decision, not a readiness grant. +type RecoveryEventKind string + +const RecoveryHalfFenceFallback RecoveryEventKind = "chunk_coverage_half_fence_fallback" + +// RecoveryEvent reports a validated open-time choice. A fallback means legacy +// recovery and upgrade must restart; it does not report replay or serving done. +type RecoveryEvent struct { + Kind RecoveryEventKind + DiscardedSlotGeneration uint64 + SelectedSlotGeneration uint64 +} + type recoveryProgressKey struct{} type recoveryClockKey struct{} diff --git a/seaweed-block/core/storage/walstore_v3.go b/seaweed-block/core/storage/walstore_v3.go index 548242f3f3..17e1acdbae 100644 --- a/seaweed-block/core/storage/walstore_v3.go +++ b/seaweed-block/core/storage/walstore_v3.go @@ -386,11 +386,33 @@ func openWALStoreV3File(path string, f *os.File, requireMap bool, opts WALStoreO } var ownedMap *chunkLSNMapV3 var mapCurrent *chunkMapCandidateV3 + var fallbackEvent *RecoveryEvent openProgress := newRecoveryReporter(progressCtx, RecoveryOpenMap) // Earlier dark row5 fixtures have no map tuple. A real immutable root is // never optional: missing metadata is not a clean map. if requireMap || d.MapRootHash != [32]byte{} { ownedMap, mapCurrent, err = openDescriptorMapV3Progress(path+".chunkmap", d, other, openProgress) + // An old writer can reuse pages named only by the marked half of a + // fence, then crash before overwriting that descriptor. Only an intact + // UNMARKED slot can restart this upgrade; a marked fallback may hide + // acknowledged writes and is never eligible. + if err != nil && coverageHalfFenceFallbackEligible(d, other, err) { + back, candidate, backErr := openDescriptorMapV3Progress(path+".chunkmap", *other, nil, openProgress) + if backErr == nil { + fallbackEvent = &RecoveryEvent{Kind: RecoveryHalfFenceFallback, DiscardedSlotGeneration: d.SlotGen, SelectedSlotGeneration: other.SlotGen} + d = *other + if id == slotA { + id = slotB + } else { + id = slotA + } + // The discarded slot is not a live map dependency. Recover will + // replace it through the existing single descriptor publisher. + other = nil + ownedMap, mapCurrent, err = back, candidate, nil + ownedMap.live.halfFenceFallbacks.Add(1) + } + } if err != nil { _ = f.Close() return nil, err @@ -477,9 +499,23 @@ func openWALStoreV3File(path string, f *os.File, requireMap bool, opts WALStoreO _ = f.Close() return nil, err } + if fallbackEvent != nil && opts.RecoveryEvent != nil { + opts.RecoveryEvent(*fallbackEvent) + } return s, nil } +// A fallback is a half-fence recovery decision, never general corruption +// recovery to an older checkpoint. Identity, incarnation and map lineage must +// agree, and operational I/O errors do not authorize another slot. +func coverageHalfFenceFallbackEligible(selected descriptorV3, other *descriptorV3, cause error) bool { + integrityFailure := errors.Is(cause, ErrMapInvalid) || errors.Is(cause, io.EOF) || errors.Is(cause, io.ErrUnexpectedEOF) + return integrityFailure && selected.ChunkStateFormat != 0 && selected.MapFormatID == mapFormatIDCoverage && + other != nil && other.ChunkStateFormat == 0 && other.MapFormatID == mapFormatIDV1 && + other.MigrationPhase == MigrationNormal && other.SlotGen < selected.SlotGen && + other.UUID == selected.UUID && sameGeometryV3(*other, selected) && other.Nonce == selected.Nonce && other.MapLineage == selected.MapLineage +} + // recoverV3 is Recover for a v3 store (DESIGN 6.5, 6.6). The caller holds // captureMu, lifecycleMu and s.mu, as v2 Recover does. func (s *WALStore) recoverV3(ctx context.Context) (uint64, error) { diff --git a/seaweed-block/docs/design/chunk-coverage.md b/seaweed-block/docs/design/chunk-coverage.md index 885507ce9d..bba07468b0 100644 --- a/seaweed-block/docs/design/chunk-coverage.md +++ b/seaweed-block/docs/design/chunk-coverage.md @@ -72,14 +72,34 @@ to a 1-GiB shape estimate. This is a runtime guard, not an on-disk format limit or a total resident-memory promise; larger geometry refuses with ErrMapInvalid until a paged implementation is qualified. -## Open half-fence recovery premise +## Half-fence recovery -The fault control `TestChunkCoverageHalfFenceReusedMapOpensTheIntactLegacySlot` -is intentionally RED in this draft. It leaves one marked map-format-2 slot, -opens the unmarked format-1 root with the unchanged legacy map allocator, -prepares the allocator's next candidate without publishing its descriptor, -and confirms that the new map was overwritten while the old map remains -intact. Current reopening refuses the selected damaged map. Safe fallback to -an intact legacy slot needs the extended SlotFence model before implementation. -The test also requires acknowledged bytes to replay exactly after that fallback; -it cannot pass by accepting an unreadable root or skipping recovery. +```mermaid +flowchart TD + A[Selected slot map] --> B{Intact?} + B -->|yes| C[Open selected slot] + B -->|no| D{Selected marked; other valid, unmarked and intact?} + D -->|yes| E[Open legacy slot; restart recovery and upgrade] + D -->|no| F[Refuse open] +``` + +A marked map can be overwritten by an old writer before that writer publishes +its next descriptor. The opener can then select the other slot only when it is +valid, unmarked, and has an intact map, with the same identity, geometry, nonce +and map lineage. Operational I/O errors do not authorize fallback. The discarded +marked slot is excluded from map binding; Recover replaces it through the sole +publisher. Both-marked map damage refuses, even when the older marked map is +intact, because falling back there could lose acknowledged marked writes. + +`WALStoreOptions.RecoveryEvent` observes a typed `RecoveryHalfFenceFallback` +event after successful open, carrying discarded and selected slot generations. +The observer performs no I/O or storage calls. `ChunkMapStatsV3.HalfFenceFallbacks` +counts these opens in this process (zero on an ordinary reopen). Neither means +replay, upgrade or readiness is complete. Legacy presence remains the evidence +for restarting the unmarked upgrade; stale record pages must not be trusted. + +The component control uses the unchanged format-1 allocator with only the +legacy root visible, prepares pages without a descriptor publication, confirms +marked-root damage and intact legacy dependencies, then checks byte-exact ACKed +replay, re-upgrade and another reopen. This is not the separately owed actual +released-binary downgrade/crash qualification. Ledger and trace remain STUB. diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index 9e98c4d76e..28251a8fec 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -56,6 +56,7 @@ stateDiagram-v2 [*] --> Opened: OpenWALStore / CreateWALStore [*] --> CreateRefused: CreateWALStore without local headroom (free < size + WAL) [*] --> CreateRefused: chunk volume, create mode: geometry flags disagree with the volume record, or the record is not read + [*] --> Opened: half-fence marked map damaged, other slot valid unmarked and intact; restart legacy recovery Opened --> Recovering: RecoverVolume Recovering --> Serving: Recover ok, backend operational; workspace primary: lease held, then HEAD claim, then frontends listen, then ready Serving --> Closed: runtime HEAD fence, exit 78 head_fenced @@ -70,7 +71,7 @@ stateDiagram-v2 | From | To | Guard | Enforced in | Protects | |---|---|---|---|---| -| — | Opened | v3 A/B descriptors and owned-map dependencies valid, exclusive file ownership acquired; legacy formats refused; backend starts not operational | `core/storage/walstore.go` `OpenWALStoreWithOptions`; `core/frontend/durable/provider.go` `openOrCreate` | `INV-WAL-OPGATE-001`, `INV-WAL-V3-ACTIVATION-001`, `INV-WAL-V3-DESCRIPTOR-001`, `INV-WAL-V3-MAP-PUBLISH-001` | +| — | Opened | v3 A/B descriptors and owned-map dependencies valid (or the selected marked map fails and the other valid unmarked half-fence slot has an intact map); exclusive file ownership acquired; legacy formats refused; backend starts not operational | `core/storage/walstore.go` `OpenWALStoreWithOptions`; `core/frontend/durable/provider.go` `openOrCreate` | `INV-WAL-OPGATE-001`, `INV-WAL-V3-ACTIVATION-001`, `INV-WAL-V3-DESCRIPTOR-001`, `INV-WAL-V3-MAP-PUBLISH-001`, `INV-CHUNK-HALF-FENCE-FALLBACK-001` | | — | CreateRefused | a new volume needs the durable root's free space >= its size + WAL, checked before the store, its WAL or its fresh marker is created (the replica floor, written when the assignment arrives, precedes the check and stays); the refusal ends the process with status 1; an existing volume opens and warns when its remaining data growth + WAL exceed the free space | `core/frontend/durable/headroom.go`; `core/frontend/durable/provider.go` `openOrCreate` | `INV-LOCAL-HEADROOM-001` | | — | CreateRefused | a chunk volume in create mode (no local store yet): before the provider is built, the geometry flags are compared with the volume record; they disagree, or the record is there but does not decode: exit 78; the filer failed the read: exit 75; nothing is created; an absent record keeps the create path; an existing store is never rechecked against the flags | `cmd/blockvolume/main.go` (create-mode check); `cmd/blockvolume/chunk_remote.go` `geometryFlagsRefusal` | `INV-VOL-GEOMETRY-FLAGS-RECORD-001` | | Opened | Recovering | the volume is open in the provider | `core/frontend/durable/provider.go` `RecoverVolume` | `INV-WAL-OPGATE-001`, `INV-RECOVERY-PROGRESS-WINDOW-001` | @@ -618,6 +619,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-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` | `TestChunkCoverageInitializesEmptyWithoutFabricatingLocalBlocks`, `TestChunkCoverageAcknowledgedWriteSurvivesReplay`, `TestChunkCoverageCheckpointKeepsAllAcrossAPageBoundary`, `TestChunkCoverageRequiresSuccessfulRecovery` (`core/storage/chunk_coverage_test.go`) | MoveWide2 durable per-block map premise; SlotFence publication | 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` | `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 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 | | `INV-WAL-V3-DESCRIPTOR-CONFLICT-001` | Open is refused when both v3 descriptor slots are valid but carry the same slotGen with different bytes, or disagree on the UUID or the geometry. | M1 Opened (v3 descriptor selection) | `core/storage/superblock_v3.go` `selectSlotV3`, `sameGeometryV3` | `TestSlotV3Selection` (`core/storage/superblock_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 dcbd15b25a..76a9e33548 100644 --- a/seaweed-block/docs/design/model-code-trace-coverage.tsv +++ b/seaweed-block/docs/design/model-code-trace-coverage.tsv @@ -7,3 +7,4 @@ MoveWide2 typed atomic bitmap observation core/storage/chunk_coverage.go:WALStor MoveWide2 bounded fanout format and shared COW nodes core/storage/chunk_coverage_map.go:encodeCoverageTreeRootV3; core/storage/chunk_coverage_map.go:coverageTreeRefsV3 core/storage/chunk_coverage_test.go:TestChunkCoverageTreeKeepsBothIndexBranches STUB SlotFence uncertain publication resumes only after reopen and recovery core/storage/chunk_coverage.go:WALStore.InitializeChunkCoverage; core/storage/chunk_coverage.go:WALStore.finishCoverageFenceLocked core/storage/chunk_coverage_test.go:TestChunkCoverageFailedPublicationResumesAfterRecovery STUB 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 STUB