mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
seaweed-block: mark the PromoLive r6 citations as checked outside the repository (on #13435) (#13442)
seaweed-block: mark the PromoLive r6 citations as checked outside the repository The convention says a TLA+ entry names a specification in docs/spec/, and PromoLive r6 is not there. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
64529e87c8
commit
476001be77
1 file changed
+6
-6
@@ -9,7 +9,7 @@ The design is described in three documents, and this one collects their machines
|
||||
**Conventions.** These are the same as in the design documents.
|
||||
|
||||
- Code references name a file and a function, not a line number. Test references name the test function and its file.
|
||||
- A TLA+ entry names a specification in [`docs/spec/`](../spec/README.md) and an invariant or property defined in it. The models check designs at small scale and are mapped to the code by reading (see the [limits](../spec/README.md#limits)).
|
||||
- A TLA+ entry names a specification in [`docs/spec/`](../spec/README.md) and an invariant or property defined in it; an entry naming a model checked outside the repository says so. The models check designs at small scale and are mapped to the code by reading (see the [limits](../spec/README.md#limits)).
|
||||
- Status:
|
||||
- `ACTIVE`: a Go test in this repository asserts the statement.
|
||||
- `STUB`: the code enforces the statement (by reading), but no test asserts it yet. A release note must not claim behaviour backed only by a `STUB` row.
|
||||
@@ -174,7 +174,7 @@ stateDiagram-v2
|
||||
| Lost | Queued (DesiredAt kept) | an intake decides the identical ask while the line, re-read after the pending check, is still the one it decided against (an ask published during the intake is not lost): enqueued again (`enqueued again ...`), the desired entry and its DesiredAt unchanged | `core/authority/controller.go` `processSupportedVolumeLocked` | `INV-AUTH-DESIRED-RETRY-001`, `INV-AUTH-DESIRED-RETRY-002` |
|
||||
| any desired (unconfirmed) | Stuck evidence | DesiredAt + retry window passed without the line observed; a repeatedly lost ask reaches it from its first desire | `core/authority/convergence.go` `evaluateStuckLocked` | `INV-AUTH-DESIRED-RETRY-002` |
|
||||
|
||||
Model: PromoLive r6 models this handoff with the intake split as the code does it (read the line and decide; after the publisher may have run, enqueue only if the ask is not pending and the line is still the one read). `RoundProgress` and `QueuedMatchesLine` hold; the mutants `dedupe_keeps_lost`, `predicate_split` and `nonatomic_submit` are each caught. The retry window and the Stuck evidence are not modelled; their test is the evidence.
|
||||
Model: PromoLive r6, checked outside the repository (it is not in `docs/spec/`), models this handoff with the intake split as the code does it (read the line and decide; after the publisher may have run, enqueue only if the ask is not pending and the line is still the one read). `RoundProgress` and `QueuedMatchesLine` hold; the mutants `dedupe_keeps_lost`, `predicate_split` and `nonatomic_submit` are each caught. The retry window and the Stuck evidence are not modelled; their test is the evidence.
|
||||
|
||||
**Volume creation phase, in blockmaster's store record** (`core/host/master/store_attestation.go`, decided by `inCreationPhase` in `core/host/master/product_loop.go`). Every replacement entry (both promotion gates, the operator's failover and planned move, the rebalance) acts only on Established.
|
||||
|
||||
@@ -984,8 +984,8 @@ Notes:
|
||||
| `INV-CLI-TYPED-REFUSAL-001` | The chunk CLI reports a restore the master refused for a foreign source as `restore_source_not_own` (from the master's typed reason, never its text) and a volume the master does not know as `volume_not_found`. | M2 none → created (restore refusal); CLI volume resolve | `core/host/master/services.go` `CreateVolume`; `core/rpc/lifecycleclient/reason.go` `WithReason`, `Reason`; `cmd/sw-block/chunk_b.go` `chunkRestore`, `run` | `TestOpsChunkTypedRefusalCodes` (`cmd/sw-block/chunk_typed_codes_test.go`), `TestReasonRoundTrip` (`core/rpc/lifecycleclient/reason_test.go`), `TestARealCatalogRestoreOfARestoreTargetLeavesNothing` (`core/host/master/restore_refusal_catalog_test.go`) | — (reporting only; the refusal is `INV-CREATE-ONE-IDENTITY-001`'s). Limits: other FailedPrecondition refusals stay the generic `not_admitted` | ACTIVE |
|
||||
| `INV-CLI-RESTORE-VERB-001` | `volume restore --abort` changes nothing unless the master records this command's source, snapshot and request id for the target and this host's settings name exactly it (volume, master, `--layout-id` alone in the extra arguments); a re-run counts only this replica's published line as placed. | client (no state machine): the CLI side of M2 restore create, placement and delete | `cmd/sw-block/volume_backup.go` `volumeRestoreAbort`, `volumeRestore`, `restorePlaced`; `core/host/master/services.go` `lifecycleVolumeResponse` | `TestVolumeRestoreAbortRefusesAForeignTarget`, `TestVolumeRestoreAbortRefusesAnotherLocalInstallation`, `TestVolumeRestoreAbortInterruptedAtEveryStepCompletes`, `TestVolumeRestoreCrashTableBothWays`, `TestVolumeRestorePublicationDuringThePlacement`, `TestVolumeRestorePlacementOfAnotherLineRefuses`, `TestVolumeRestoreCreatesPlacesAndStarts`, `TestVolumeBackupTakesOneSnapshotAndRerunReplays`, `TestVolumeBackupRefusals`, `TestVolumeBackupIncompleteAnswerIsUnknown` (`cmd/sw-block/volume_backup_test.go`), `TestGetVolumeAnswersTheRecordedRestoreTuple` (`core/host/master/volume_restore_tuple_test.go`) | — (the command's model is checked outside the repository; its trace is on the pull request) | ACTIVE |
|
||||
| `INV-AUTH-EPOCH-MINT-001` | Only the publisher mints epochs; a reassignment takes the per-volume maximum epoch plus one, also after a restart. | M2 Bound → Reassigned | `core/authority/authority.go` `applyWithWorkspaceMove`, `maxPublishedEpochForVolume` | `TestLayoutGrantedEpochIssuerSites`, `TestLayoutEpochEnumerationRejectsANewIssuer`, `TestG8_0_Publisher_ReassignAdvancesPerVolumeEpochAcrossReplicaSlots` (`core/authority/g8_0_authority_failover_test.go`); `TestDurableAuthority_PublisherAdvancesFromReloaded` (`core/authority/authority_restart_test.go`); `TestG9F2_AssignmentRequestShapeHasNoEpochOrEndpointVersion` (`core/host/master/authority_request_bridge_test.go`); also in `core/authority/layout_granted_epoch_guard_test.go` | `ControlPlane` `UniqueEpoch` | ACTIVE |
|
||||
| `INV-AUTH-DESIRED-RETRY-001` | The controller deduplicates a desired ask only while it is pending: queued, or taken by the publisher and still being applied. An identical ask that ended without a publication, the line still the one it was decided against, is enqueued again on the next intake. | M2 controller ask: Queued or Held (deduplicated); Held → Lost; Lost → Queued | `core/authority/controller.go` `processSupportedVolumeLocked`; `core/authority/queue.go` `pending`, `next` | `TestALostReassignIsEnqueuedAgainOnTheNextIntake`, `TestAnAskPublishedDuringTheIntakeIsNotEnqueuedAgain` (`core/authority/controller_lost_ask_test.go`) | PromoLive r6 `QueuedMatchesLine`, `RoundProgress` (mutants `dedupe_keeps_lost`, `nonatomic_submit`) | ACTIVE |
|
||||
| `INV-AUTH-DESIRED-RETRY-002` | An ask enqueued again keeps its first DesiredAt, so an ask lost on every apply still becomes Stuck once the retry window passes from that first desire. | M2 controller ask: Lost → Queued (DesiredAt kept); Stuck evidence | `core/authority/controller.go` `processSupportedVolumeLocked`; `core/authority/convergence.go` `evaluateStuckLocked` | `TestARepeatedlyLostReassignKeepsItsDesiredAtAndBecomesStuck` (`core/authority/controller_lost_ask_test.go`) | PromoLive r6 `RoundProgress` (the retry; the retry window and Stuck are not modelled: the test is the evidence) | ACTIVE |
|
||||
| `INV-AUTH-DESIRED-RETRY-001` | The controller deduplicates a desired ask only while it is pending: queued, or taken by the publisher and still being applied. An identical ask that ended without a publication, the line still the one it was decided against, is enqueued again on the next intake. | M2 controller ask: Queued or Held (deduplicated); Held → Lost; Lost → Queued | `core/authority/controller.go` `processSupportedVolumeLocked`; `core/authority/queue.go` `pending`, `next` | `TestALostReassignIsEnqueuedAgainOnTheNextIntake`, `TestAnAskPublishedDuringTheIntakeIsNotEnqueuedAgain` (`core/authority/controller_lost_ask_test.go`) | PromoLive r6 (outside the repository) `QueuedMatchesLine`, `RoundProgress` (mutants `dedupe_keeps_lost`, `nonatomic_submit`) | ACTIVE |
|
||||
| `INV-AUTH-DESIRED-RETRY-002` | An ask enqueued again keeps its first DesiredAt, so an ask lost on every apply still becomes Stuck once the retry window passes from that first desire. | M2 controller ask: Lost → Queued (DesiredAt kept); Stuck evidence | `core/authority/controller.go` `processSupportedVolumeLocked`; `core/authority/convergence.go` `evaluateStuckLocked` | `TestARepeatedlyLostReassignKeepsItsDesiredAtAndBecomesStuck` (`core/authority/controller_lost_ask_test.go`) | PromoLive r6 (outside the repository) `RoundProgress` (the retry; the retry window and Stuck are not modelled: the test is the evidence) | ACTIVE |
|
||||
| `INV-AUTH-RESTART-REISSUE-001` | A line records the primary process it was issued for (durable); a current primary reporting another process is re-issued its line at a new endpoint version, and a primary adopts no line issued for another process, so a restarted process never reuses the dead one's sessions. | M2 authority (RefreshEndpoint); M3 primary adoption | `core/authority/authority.go` `applyWithWorkspaceMove` (records the ask's or the source's incarnation); `core/authority/controller.go` `endpointStale`, `sameAsk`, `refreshAsk` (conditional on the line it read); `core/host/master/product_loop.go` `RunLifecycleProductTick`, `restartedHolderRefresh` (the product loop's direct path for a workspace-bound RF1 volume, conditional on the line it read); `core/authority/workspace.go` `persistWorkspaceTimedLocked`; `core/authority/observation_store.go` `SlotFactAt`; `core/host/master/host.go` (the source); `core/host/volume/host.go` `applyFact` | `TestPublisher_RestartedPrimaryGetsANewEndpointVersion`, `TestPublisher_AskWithoutAProcessIsIssuedForTheReportedOne`, `TestTopologyController_RestartedPrimaryAtTheSameAddressIsReissued`, `TestTopologyController_QueuedRefreshIsReplacedForANewerProcess`, `TestTopologyController_UnnamedLineIsReissuedOnceForTheReportingProcess`, `TestWorkspaceLeaseWriteKeepsTheLinesIncarnationAcrossReload`, `TestObservationStore_SlotFactAtIsTheProcessAtThoseEndpoints` (`core/authority/restart_endpoint_version_test.go`); `TestLinesNameTheirPrimarysProcess`, `TestLineForTheTargetsEndpointsNamesTheTargetsProcess` (`core/host/master/line_incarnation_test.go`); `TestRF1RuntimeVolumeIsReissuedToARestartedHolder`, `TestRF1RuntimeLineNamingNoProcessIsReissued`, `TestRF1RefreshDecidedBeforeACrossHostMoveIsNotApplied` (`core/host/master/rf1_restart_reissue_test.go`); `TestRefreshIsConditionalOnTheLineItWasDecidedAgainst`, `TestControllerRefreshNamesTheLineItWasDecidedAgainst` (`core/authority/refresh_expected_line_test.go`); `TestHost_ApplyFact_LineIssuedForAnotherProcessIsNotAdopted`, `TestHost_ApplyFact_UnnamedLineIsNotAdoptedWhereLinesNameTheirProcess` (`core/host/volume/line_incarnation_test.go`); `TestHostConfigAdoptsOnlyLinesNamingThisProcess` (`cmd/blockvolume/lines_name_their_process_test.go`); `TestRestartedPrimaryAtTheSameEpochIsAdmitted` (`core/replication/primary_restart_session_test.go`) | — | ACTIVE |
|
||||
| `INV-AUTH-PERSIST-BEFORE-PUBLISH-001` | With an authority store configured, an assignment is written to the store before memory or any subscriber sees it, a failed write does not publish it, and an unknown outcome (directory fsync after the rename failed) fail-stops blockmaster: see M2 any → (store write first). | M2 any → (store write first) | `core/authority/authority.go` `applyWithWorkspaceMove`; `core/authority/authority_store_file.go` `Put` (`failStopDurabilityUnknown` after a failed directory open or fsync behind the rename, every record; a close error after a good fsync is reported written; Windows keeps its previous behaviour) | `TestDurableAuthority_PutFailureRollsBackInMemoryState` (`core/authority/authority_restart_test.go`); `TestPutFailStopsWhenTheDirectoryFsyncFailsAfterRename`, `TestPutReportsWrittenWhenOnlyTheDirectoryCloseFails` (`core/authority/authority_store_dir_fsync_test.go`) | `ControlPlane` `UniqueEpoch` | ACTIVE |
|
||||
| `INV-AUTH-MOVE-JOURNAL-001` | A workspace move's epoch is issued only after its journal record is durable, and one move request id gets exactly one epoch, also across restarts. | M2 MoveReserved → MoveIssued | `core/authority/workspace.go` `prepareWorkspaceMoveLocked`, `MoveWorkspace`, `sameWorkspaceRequest` | `TestWorkspaceMoveCannotIssueEpochWithoutJournal`, `TestWorkspaceCrashAfterJournalBeforeEpochResumesSameGrant` (`core/authority/workspace_test.go`); `TestWorkspaceReplayedIssueStartsGranteeLease` (`core/authority/workspace_unclaimed_grant_test.go`) | `ControlPlane` `Idempotent`, `JournalComplete` | ACTIVE |
|
||||
@@ -1355,8 +1355,8 @@ Notes:
|
||||
| `INV-PROMOTE-ACK-PROFILE-MATCH-001` | The automatic path holds a lost primary's volume, before any fencing round and showing `ack_profile_mismatch`, when a probe answer names no ack profile or another than blockmaster's `--launcher-replication-ack`; blockmaster refuses to start with an unknown one. | M3 Supporting → promotion candidate (both gates) | `core/host/master/probe_round.go` `profileMismatch`; `core/host/master/product_loop.go` `automaticFailoverHold` (plain round), `fencedDecision` (fencing round); `core/host/volume/probe_round.go` `probeAnswer`; `cmd/blockvolume/main.go` `hostConfig`; `cmd/blockmaster/main.go` `parseFlags` | `TestTheAutomaticPathHoldsOnAnAckProfileMismatch`, `TestProbeRound_ReportsAnAckProfileMismatch`, `TestTheFencingRoundsAckProfileIsCheckedToo` (`core/host/master/ack_profile_mismatch_test.go`); `TestProbeAnswerNamesTheVolumesAckProfile` (`core/host/volume/probe_ack_profile_test.go`); `TestHostConfigAnswersTheVolumesOwnAckProfile` (`cmd/blockvolume/probe_ack_profile_test.go`); `TestBlockmasterRefusesAnUnknownLauncherReplicationAck` (`cmd/blockmaster/launcher_replication_ack_flag_test.go`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-DECISION-REPORTED-001` | Every replace decision of the supported promotion gate is logged once after its tick: with the controller's outcome from the same submission (read under its lock, so a later intake cannot change it), as not submitted and why, or as a failed submit. Diagnostics only: no decision changes. | M3 Supporting → promotion candidate (supported gate → controller → publisher) | `core/host/master/product_loop.go` `submitPlacementSnapshots`, `noteGateReplace`, `reportReplaces`; `core/authority/controller.go` `SubmitObservedStateOutcomes`, `LastOutcome` | `TestAReplaceDecisionLogsWhatTheControllerDidWithIt` (cases: enqueued, already desired, no ask with why, not submitted, an intake after the submission does not change its report, a submission that did not carry the volume, one report per decision), `TestAProductTickReplaceLogsTheControllerOutcomeAndThePublication`, `TestABindingReadFailureAfterTheProbeReportsTheDecisionNotSubmitted` (`core/host/master/gate_controller_outcome_test.go`, `core/host/master/gate_binding_read_failure_test.go`) | — (diagnostics; no published specification models the log) | ACTIVE |
|
||||
| `INV-AUTHORITY-PUBLICATION-LOGGED-001` | Every authority publication is logged on the master's log with its volume, replica, epoch, endpoint version and intent, also when no event sink is set. Diagnostics only: no decision changes. | M3 controller → publisher (publication observer) | `core/host/master/product_loop.go` `recordAuthorityPublishedEvent` | `TestAPublicationIsLogged`, `TestAProductTickReplaceLogsTheControllerOutcomeAndThePublication` (`core/host/master/gate_controller_outcome_test.go`) | — (diagnostics; no published specification models the log) | ACTIVE |
|
||||
| `INV-PROMOTE-REPLACE-HANDOFF-001` | A fenced replace decided by the supported promotion gate, whatever its reason (a recorded loss, or a primary only the gate reads as unacceptable, such as one on a node below the cluster's format level), submits the replaced primary's slot as unreachable and not ready. | M2 controller ask: no desired ask → Queued (failover) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate` | `TestAFencedReplaceOfAPrimaryOnlyTheGateRejectsReachesAReassign` (`core/host/master/gate_controller_replace_test.go`) | PromoLive r6 `RoundProgress` (mutant `predicate_split`) | ACTIVE |
|
||||
| `INV-PROMOTE-REPLACE-HANDOFF-002` | The controller never keeps a primary the gate replaced by its own acceptability predicate: it publishes the fenced target with its fenced evidence, the line minted only at the fenced epoch. | M2 controller ask: no desired ask → Queued (failover); M3 Primary → another replica Primary at e+1 | `core/authority/controller.go` `decideVolume` | `TestAFencedReplaceOfAPrimaryOnlyTheGateRejectsReachesAReassign` (`core/host/master/gate_controller_replace_test.go`); `TestALostPrimarysFencedReplacementIsPublished` (`core/host/master/primary_loss_publish_test.go`) | PromoLive r6 `RoundProgress` (mutant `predicate_split`) | ACTIVE |
|
||||
| `INV-PROMOTE-REPLACE-HANDOFF-001` | A fenced replace decided by the supported promotion gate, whatever its reason (a recorded loss, or a primary only the gate reads as unacceptable, such as one on a node below the cluster's format level), submits the replaced primary's slot as unreachable and not ready. | M2 controller ask: no desired ask → Queued (failover) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate` | `TestAFencedReplaceOfAPrimaryOnlyTheGateRejectsReachesAReassign` (`core/host/master/gate_controller_replace_test.go`) | PromoLive r6 (outside the repository) `RoundProgress` (mutant `predicate_split`) | ACTIVE |
|
||||
| `INV-PROMOTE-REPLACE-HANDOFF-002` | The controller never keeps a primary the gate replaced by its own acceptability predicate: it publishes the fenced target with its fenced evidence, the line minted only at the fenced epoch. | M2 controller ask: no desired ask → Queued (failover); M3 Primary → another replica Primary at e+1 | `core/authority/controller.go` `decideVolume` | `TestAFencedReplaceOfAPrimaryOnlyTheGateRejectsReachesAReassign` (`core/host/master/gate_controller_replace_test.go`); `TestALostPrimarysFencedReplacementIsPublished` (`core/host/master/primary_loss_publish_test.go`) | PromoLive r6 (outside the repository) `RoundProgress` (mutant `predicate_split`) | ACTIVE |
|
||||
| `INV-PRIMARY-ACK-PROFILE-001` | A primary of a replicated line serves only when its own `--replication-ack` is the profile its assignment names (blockmaster's); otherwise its frontend is not Healthy and status names both profiles. So a lost primary, which does not answer, acknowledged under the master's profile. | M1 Primary → Serving (replicated line) | `core/host/master/services.go` `assignmentFact` (`ack_profile`); `core/host/volume/workspace_startup.go` `noteAckProfile`; `core/host/volume/projection_bridge.go` `projectionWithSupersede`; `core/host/volume/status_server.go` | `TestPrimaryOfAReplicatedLineServesOnlyUnderTheMastersAckProfile` (`core/host/volume/ack_profile_refusal_test.go`); `TestAssignmentNamesTheMastersAckProfile` (`core/host/master/ack_profile_mismatch_test.go`) | — | ACTIVE |
|
||||
| `INV-CSI-CONSUMES-AUTHORITY-001` | CSI never imports authority code or builds assignment facts; it takes the publish target from blockmaster and refreshes it before a stage, and blockmaster mints the IDs of the events CSI reports. | M2 (read side) | `core/csi/master_backend.go` `LookupPublishTarget`; `core/csi/node.go` `refreshPublishContext`; `core/host/master/observation_service.go` `ReportClusterEvent` | `TestG15a_CSI_DoesNotImportAuthorityOrConstructAssignmentFacts` (`core/csi/boundary_guard_test.go`); `TestG15e_CSIReattachUsesFreshPublishTargetAfterUnstage` (`core/csi/node_test.go`); `TestObservationService_ReportClusterEventAppearsInVolumeTimeline` (`core/host/master/observation_service_test.go`) | — | ACTIVE |
|
||||
| `INV-K8S-NONLOOPBACK-001` | Generated multi-node Helm values enable external iSCSI, external status and loopback rejection; with rejection enabled CSI never publishes a loopback target and fails closed when only loopback targets exist. | M2 (read side) | `cmd/sw-block/main.go` `runOpsGenerateHelmValues`; `core/csi/master_backend.go` `rejectFrontendAddr` | `TestOpsGenerateHelmValuesMultiNodeExternalISCSI` (`cmd/sw-block/main_test.go`); `TestNodeLoss_ControlStatusLookup_RejectsLoopbackPublishTargetsWhenEnabled`, `TestNodeLoss_ControlStatusLookup_FailClosedWhenOnlyLoopbackTargets` (`core/csi/master_backend_test.go`) | — | ACTIVE |
|
||||
|
||||
Reference in new issue
Block a user