From 6c5a1b42e4de6131c8760100def4834dc561abc6 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 30 Nov 2026 03:09:02 -0800 Subject: [PATCH] docs: trace the chunk-state slot fence to its model rules --- seaweed-block/.github/model-code-trace.tsv | 2 ++ seaweed-block/docs/design/model-code-trace-slot-fence.tsv | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 seaweed-block/docs/design/model-code-trace-slot-fence.tsv diff --git a/seaweed-block/.github/model-code-trace.tsv b/seaweed-block/.github/model-code-trace.tsv index 24b2a86e81..635123eff3 100644 --- a/seaweed-block/.github/model-code-trace.tsv +++ b/seaweed-block/.github/model-code-trace.tsv @@ -115,6 +115,8 @@ core/storage/chunk_layer.go HolderInterface.StopCommit core/storage/chunk_layer.go MoveAdmission.Detach core/storage/chunk_layer.go MoveAdmission.Publish core/storage/chunk_layer.go SnapshotRemoval.Write +core/storage/chunk_state_upgrade.go SlotFence.Publish +core/storage/chunk_state_upgrade.go SlotFence.Sync core/transport/catchup_sender.go ReplicationPeer.CatchUp core/transport/rebuild_sender.go ReplicationPeer.Rebuild core/transport/replica.go FencingRound.Recv diff --git a/seaweed-block/docs/design/model-code-trace-slot-fence.tsv b/seaweed-block/docs/design/model-code-trace-slot-fence.tsv new file mode 100644 index 0000000000..b1c37a4121 --- /dev/null +++ b/seaweed-block/docs/design/model-code-trace-slot-fence.tsv @@ -0,0 +1,6 @@ +model item kind go_function tests status note +SlotFence 146: both marked slots before completion rule core/storage/chunk_state_upgrade.go:WALStore.FenceChunkStateUpgrade core/storage/chunk_state_upgrade_test.go:TestChunkStateUpgradeFencesBothSlotsBeforeCompletion,core/storage/chunk_state_upgrade_test.go:TestChunkStateUpgradeUncertainSecondSlotRequiresReopen STUB Store completion boundary only; record-header caller remains unwired. Single-publication mutant fails. +SlotFence 147: count a slot only after sync and readback rule core/storage/descriptor_v3.go:descriptorPublisherV3.publishLockedCoreV3; core/storage/chunk_state_upgrade.go:WALStore.FenceChunkStateUpgrade core/storage/chunk_state_upgrade_test.go:TestChunkStateUpgradeFailureNeverCompletesUntilReopen STUB Six injected write/sync/readback failures refuse completion and latch until reopen; unlatched-readback mutant fails. +SlotFence 148: preserve the minimum decoded-slot WAL tail premise core/storage/descriptor_v3.go:descriptorPublisherV3.reuseFloorLocked; core/storage/wal_io_v3.go:walWriterV3.append core/storage/descriptor_v3_test.go:TestDescriptorV3FullRingRolloverAdvancesTheFloorWithoutAnyChange; core/storage/chunk_state_upgrade_test.go:TestChunkStateUpgradeUncertainSecondSlotRequiresReopen CONFIRMED Existing writer uses the minimum retained tail of both decoded slots; half-upgrade boundary changes no WAL bounds. +SlotFence 149: reject cached pages behind store positions integration OWED New record-page reader is stacked in PR 816; no assertion here that the store-fence component implements the page-position check. This premise must be confirmed in integrated code before activation. +SlotFence reopen after an old writer erases the marker witness core/storage/walstore_v3.go:openWALStoreV3File; core/storage/chunk_state_upgrade.go:WALStore.FenceChunkStateUpgrade core/storage/chunk_state_upgrade_test.go:TestChunkStateUpgradeOldReaderPublicationRestartsTheFence STUB Captured legacy descriptor bytes simulate the old metadata publication; no released binary execution claimed. Caller must rebuild legacy-derived pages before completing again.