From 006ea07e5e6449fc1836b8a00632fe5af72dcaa8 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 5 Dec 2026 01:13:59 -0800 Subject: [PATCH] seaweed-block: docs: re-point stale model action citations DeleteRetire's single Retire action was split into RetireLine and RetirePlace; the authority-line files now map to RetireLine and the retirement invariant cites both. StopAndRestart.SameEpochReopen is a mutation switch, not an action; the start path maps to CrashRestart, whose guard keeps a detached HEAD at its own epoch down. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/.github/model-code-trace.tsv | 8 ++++---- seaweed-block/docs/design/invariants.md | 2 +- seaweed-block/docs/time-bounds.tsv | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/seaweed-block/.github/model-code-trace.tsv b/seaweed-block/.github/model-code-trace.tsv index 5b23bd5f63..fc203e84f1 100644 --- a/seaweed-block/.github/model-code-trace.tsv +++ b/seaweed-block/.github/model-code-trace.tsv @@ -11,14 +11,14 @@ cmd/sw-block/volume_backup.go RestoreCommand.Abort cmd/sw-block/volume_backup.go RestoreCommand.AbortVerify cmd/sw-block/volume_backup.go RestoreCommand.Run cmd/sw-block/volume_backup.go RestoreCommand.Start +cmd/sw-block/volume_start_release.go StopAndRestart.CrashRestart cmd/sw-block/volume_start_release.go StopAndRestart.IssueClean cmd/sw-block/volume_start_release.go StopAndRestart.ReadClean -cmd/sw-block/volume_start_release.go StopAndRestart.SameEpochReopen cmd/sw-block/volume_verbs.go CutTime.CliGiveUp cmd/sw-block/volume_verbs.go CutTime.Poll cmd/sw-block/workspace_show.go MoveAdmission.ReadForMove -core/authority/authority.go DeleteRetire.Retire -core/authority/authority_store_file.go DeleteRetire.Retire +core/authority/authority.go DeleteRetire.RetireLine +core/authority/authority_store_file.go DeleteRetire.RetireLine core/authority/workspace.go HolderInterface.ForcedMove core/authority/workspace.go HolderInterface.PlannedMove core/authority/workspace.go MoveAdmission.Ack @@ -36,7 +36,7 @@ core/authority/workspace_delete_reservation.go MoveAdmission.DelCheck core/authority/workspace_delete_reservation.go MoveAdmission.Reserve core/authority/workspace_lease_view.go HolderInterface.Grant core/authority/workspace_lease_view.go HolderInterface.Regrant -core/authority/workspace_retirement.go DeleteRetire.Retire +core/authority/workspace_retirement.go DeleteRetire.RetireLine core/engine/apply.go ReplicationPeer.Reconcile core/frontend/chunkstore/catalog_b.go CleanBatch.Publish core/frontend/chunkstore/catalog_b.go CleanBatch.Request diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index 340602623d..677212819c 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -1206,7 +1206,7 @@ Notes: | `INV-CUT-TIMER-SKIP-001` | A periodic cut decided from an older last cut is skipped under the capture lock: no automatic cut follows another within the interval. | M5 periodic trigger (before Admit) | `core/storage/chunk_periodic_cut.go` `CutUnlessCutSince`; `core/frontend/durable/provider_chunk.go` `chunkLoop` | `TestChunkPeriodicCut_SkipsAfterANewerCut`, `TestChunkPeriodicCut_SkipsANewerCutWithAnOlderStamp` (`core/storage/chunk_periodic_cut_test.go`); `TestWALStoreChunk_ExplicitCutOverlappingTheTimerRestartsIt` (`core/frontend/durable/provider_chunk_sched_test.go`) | — | ACTIVE | | `INV-CUT-TIMER-SLOT-WAIT-001` | A periodic cut refused for held host slots, pending urgent work or an earlier ticket is a wait, not a failure: no backoff or minimum spacing; it retries at the next poll in ticket order, and status reports the wait until any later cut succeeds. Other errors keep the backoff. | M5 periodic trigger (before Admit) | `core/frontend/durable/provider_chunk.go` `cutPolicy.after`, `chunkLoop`; `core/hostlimit/limiter.go` `ErrSlotsHeld` | `TestCutPolicy_HostSlotBusyIsAWaitNotAFailure`, `TestCutPolicy_SuccessDuringSlotWaitEndsTheWait`, `TestCutWaitSlot_StatusEndsTheWaitAfterALaterCut`, `TestCutPolicy_TicketOrderWaitBound` (`core/frontend/durable/cut_policy_test.go`); `TestTimerCutRunsSoonAfterHostSlotFrees`, `TestSlotWaitEndsWithASuccessfulDetachSeal` (`core/frontend/durable/host_slot_wait_test.go`); `TestAdmitClosedDuringPoolAcquisitionIsRevoked` (`core/hostlimit/limiter_test.go`) | — | ACTIVE | | `INV-SNAPSHOT-ANSWER-COUNT-001` | Newly produced snapshot creation and listing answers omit the uncomputed chunk count; no manifest scan is added to answer a snapshot. | M9 snapshot answer projection (no transition change) | `core/frontend/chunkstore/control_types.go`, `api.go`; `core/host/volume/chunk_control.go` | `TestSnapshotAfter200MiBWritesOmitsUncomputedChunkCount` (`core/host/volume/snapshot_chunk_count_test.go`) | NONE (pure projection of the published snapshot; no authority or persisted format change) | STUB | -| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.Retire; DeleteRetire.HostRetire | STUB | +| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.RetireLine; DeleteRetire.RetirePlace; DeleteRetire.HostRetire | STUB | | `INV-SPEC-DELETE-RETRY-001` | Startup lease barriers schedule one more retirement pass after the latest observed barrier, independently of the product loop. The pass rechecks every lease and HEAD guard, logs skipped volumes, and is cancelled and joined before stores close. | M4 delete retirement scheduling | `core/host/master/host.go` `Start`, `Close`; `spec_retirement.go` `startPostFloorRetirement` | `TestStandaloneRestartRetriesSpecRetirementAfterLeaseFloor`, `TestRetirementLeaseBarrierIsOnlyASchedulingHint`, `TestPostFloorRetirementTimerJoinsOnCancellation` | DeleteRetire.ReadOK; DeleteRetire.Retire | STUB | | `INV-SPEC-UNUSED-PLACEMENT-001` | A spec startup prunes an undesired placement only before serving and with no volume record, authority line, binding or deletion reservation, and no skipped authority recovery. The desired spec and seed are one keep set. | M4 registration input | `cmd/blockmaster/main.go`; `core/host/master/spec_retirement.go` | `TestClusterSpecImportRemovesUnusedPlacementMissingFromSpec`, `TestClusterSpecCleanupKeepsRecordsBindingsAuthorityAndSeed` | NONE (registration-only cleanup before controller activity) | STUB | | `INV-CHECK-DELETING-001` | A post-lease reserved volume with HEAD deleting, deleted or absent holds no serving work. Its status is informational and checks issue no lease or holder requests for it. Another volume's failures remain visible. | M9 delete observation | `core/host/master/observation_snapshot.go`, `journal_isolation.go`; `cmd/sw-block/shell_check.go` | `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestClusterCheckDoesNotProbeDeletingOrDeletedVolumes` | DeleteRetire.HostRetire | STUB | diff --git a/seaweed-block/docs/time-bounds.tsv b/seaweed-block/docs/time-bounds.tsv index 19111b00f0..5cdc8e991c 100644 --- a/seaweed-block/docs/time-bounds.tsv +++ b/seaweed-block/docs/time-bounds.tsv @@ -103,7 +103,7 @@ cmd/sw-block/volume_release.go releaseLease context.WithTimeout 1 per-call NONE: cmd/sw-block/volume_release.go releaseLease context.WithTimeout 2 availability-contract NONE: no model row maps this file yet the wait for the recorded release: one lease validity plus slack, since the holder acknowledges at its next renewal within the lease cmd/sw-block/volume_release.go releaseLease time.After 1 control-timer NONE: no model row maps this file yet lease record poll during the release wait cmd/sw-block/volume_resolve.go runOpsVolume context.WithTimeout 1 per-call NONE: no model row maps this file yet one CLI request (operator --timeout) -cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.SameEpochReopen lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed +cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.CrashRestart lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed cmd/sw-block/volume_verbs.go runVolume http.Client.Timeout 1 per-call CutTime.Poll one HTTP request cmd/sw-block/volume_verbs.go volumeStart time.Now().Add 1 per-call CutTime.Poll volume start: the operator's --wait for it to serve cmd/sw-block/volume_verbs.go volumeStart time.After 1 control-timer CutTime.Poll volume start poll