mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
fix(storage): preserve answered HEAD format refusals (#981)
Merge note (pull_request_target spec-trace workflow has a startup_failure on every branch since 2026-12-02 22:45Z, so its checks run locally): - Test run 47121908444 succeeded (go test (linux), process-level tests (real binaries)) on head 005a03ab against main b6e76493, the current main head. - spec-trace-check.sh and public-text-check.sh, run with the main branch's scripts against this head and body: both exit 0. - Code review ACCEPT on 8ee92c4e (a refusal before any write cannot erase earlier uncertainty; retained work and the composed guard checked); the head since then only merges main. 18a model check PASS.
This commit is contained in:
1 parent
f5fea69cf7
commit
39d368e0c7
11 files changed
+164
-11
No files matched your search
+5
@@ -284,3 +284,8 @@ cmd/sw-block/cut_progress_poll.go CutTime.CliServerUnknown
|
||||
core/storage/chunk_manual_cut.go HolderInterface.Fence
|
||||
core/storage/chunk_manual_cut.go CutTime.SettleInherited
|
||||
core/storage/cut_progress_window.go CutWindow.CallTimeout
|
||||
core/frontend/chunkstore/layout_remote.go FormatGate.Upgrade1
|
||||
core/storage/chunk_layer.go FormatGate.Upgrade1
|
||||
core/storage/chunk_seam.go FormatGate.Upgrade1
|
||||
core/storage/chunk_public.go FormatGate.Upgrade1
|
||||
core/host/volume/chunk_control.go FormatGate.Upgrade1
|
||||
|
@@ -0,0 +1,45 @@
|
||||
package chunkstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout"
|
||||
"github.com/seaweedfs/seaweed-block/core/storage"
|
||||
)
|
||||
|
||||
// A format guard is an answered refusal before the conditional write, not
|
||||
// a lost publication answer that may later land. Exercise the real adapter
|
||||
// through the layer, rather than only checking the layout kernel's error.
|
||||
func TestLevelZeroCutRefusalDoesNotBecomeAnUnresolvedPublication(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
lh := newLayoutHost(t)
|
||||
s, layer, remote := lh.attach("format-refusal", true, true)
|
||||
defer s.Close()
|
||||
remote.SetHeadFormat(true, 0)
|
||||
writeSync(t, s, map[uint32][]byte{0: block(0x71)})
|
||||
remote.SetSnapshot("during-upgrade", layout.SnapshotMeta{CreatedNs: 1}, 0)
|
||||
for attempt := 0; attempt < 2; attempt++ {
|
||||
_, err := layer.Cut(ctx)
|
||||
if !errors.Is(err, layout.ErrFormatLevelBelowHeadVersion) || errors.Is(err, storage.ErrChunkCASOutcomeUnknown) {
|
||||
t.Fatalf("refused cut %d: %v; pending=%t; want the typed format refusal, never unknown", attempt, err, layer.Stats().PendingUnresolved)
|
||||
}
|
||||
if layer.Stats().PendingUnresolved {
|
||||
t.Fatal("a refused HEAD write was retained for settle-by-read-back")
|
||||
}
|
||||
if h := lh.head(); h.Version != 0 || h.Current != nil || len(h.Snapshots) != 0 {
|
||||
t.Fatalf("refused cut changed HEAD: %+v", h)
|
||||
}
|
||||
}
|
||||
remote.SetHeadFormat(true, 1)
|
||||
if _, err := layer.Cut(ctx); err != nil {
|
||||
t.Fatalf("cut after the format level permits it: %v", err)
|
||||
}
|
||||
if h := lh.head(); h.Version != 1 || h.Current == nil || h.Snapshots["during-upgrade"].Root != *h.Current {
|
||||
t.Fatalf("retry did not publish the retained snapshot: %+v", h)
|
||||
}
|
||||
lh.readBack("format-reader", map[uint32][]byte{0: block(0x71)})
|
||||
}
|
||||
@@ -1489,6 +1489,9 @@ func layoutRemoteErr(err error) error {
|
||||
switch {
|
||||
case err == nil:
|
||||
return nil
|
||||
case errors.Is(err, layout.ErrFormatLevelBelowHeadVersion):
|
||||
// The shared format guard answered before any conditional HEAD write.
|
||||
return fmt.Errorf("%w: %w", storage.ErrChunkHeadWriteRefused, err)
|
||||
case errors.Is(err, layout.ErrNotHolder), errors.Is(err, layout.ErrStaleEpoch), errors.Is(err, layout.ErrDetached),
|
||||
errors.Is(err, layout.ErrPositionBehind):
|
||||
return fmt.Errorf("%w: %w", storage.ErrChunkLayerFenced, err)
|
||||
|
||||
@@ -438,6 +438,8 @@ func chunkErrorCode(err error) (int, string, bool) {
|
||||
return http.StatusConflict, "layout_refused", false
|
||||
case errors.As(err, &ce):
|
||||
return catalogStatus(ce.Code), ce.Code, ce.Retryable
|
||||
case errors.Is(err, layout.ErrFormatLevelBelowHeadVersion):
|
||||
return http.StatusConflict, "format_level_below_head_version", false
|
||||
case errors.Is(err, storage.ErrChunkLSNBehind):
|
||||
return http.StatusConflict, codeLSNBehind, false
|
||||
case errors.Is(err, durable.ErrChunkAwaitingAuthority):
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package volume
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout"
|
||||
"github.com/seaweedfs/seaweed-block/core/storage"
|
||||
)
|
||||
|
||||
func TestChunkFormatRefusalIsTypedWithoutHidingAnEarlierUnknownWrite(t *testing.T) {
|
||||
refusal := fmt.Errorf("cut commit: %w", layout.ErrFormatLevelBelowHeadVersion)
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
err error
|
||||
status int
|
||||
code string
|
||||
retry bool
|
||||
}{
|
||||
{"answered refusal", refusal, http.StatusConflict, "format_level_below_head_version", false},
|
||||
{"earlier write still unknown", errors.Join(storage.ErrChunkCASOutcomeUnknown, refusal), http.StatusServiceUnavailable, "outcome_unknown", true},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
status, code, retry := chunkErrorCode(tc.err)
|
||||
if status != tc.status || code != tc.code || retry != tc.retry {
|
||||
t.Fatalf("got %d/%s/retry=%t; want %d/%s/retry=%t", status, code, retry, tc.status, tc.code, tc.retry)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type refusingHeadRemote struct {
|
||||
*fakeChunkRemote
|
||||
refuse bool
|
||||
}
|
||||
|
||||
func (r *refusingHeadRemote) CASHead(ctx context.Context, expected chunkHeadVersion, next chunkHead) (uint64, error) {
|
||||
if r.refuse {
|
||||
return 0, errChunkHeadWriteRefused
|
||||
}
|
||||
return r.fakeChunkRemote.CASHead(ctx, expected, next)
|
||||
}
|
||||
func (r *refusingHeadRemote) CASHeadDelta(ctx context.Context, expected chunkHeadVersion, next chunkHead, changes map[uint64]*chunkRef) (uint64, error) {
|
||||
if r.refuse {
|
||||
return 0, errChunkHeadWriteRefused
|
||||
}
|
||||
return r.fakeChunkRemote.CASHeadDelta(ctx, expected, next, changes)
|
||||
}
|
||||
|
||||
func TestARefusedReproposalDoesNotSettleAnEarlierUnknownWrite(t *testing.T) {
|
||||
s, _ := newMappedCheckpointStoreV3(t)
|
||||
f := newFakeChunkRemote()
|
||||
r := &refusingHeadRemote{fakeChunkRemote: f}
|
||||
layer := mustAttach(t, s, r, ctConfig(1))
|
||||
newWriteLog().write(t, s, 2, 0x72)
|
||||
f.casModes = []fakeCASMode{casUnknownNotApplied}
|
||||
if _, err := layer.Cut(ctTimeout(t)); !errors.Is(err, errChunkCASOutcomeUnknown) {
|
||||
t.Fatalf("setup did not leave an uncertain publication: %v", err)
|
||||
}
|
||||
r.refuse = true
|
||||
if _, err := layer.Cut(ctTimeout(t)); !errors.Is(err, errChunkCASOutcomeUnknown) || !layer.Stats().PendingUnresolved {
|
||||
t.Fatalf("a refused retry cannot settle the earlier write: %v; pending=%t", err, layer.Stats().PendingUnresolved)
|
||||
}
|
||||
}
|
||||
|
||||
func TestARefusedConfirmationReadDoesNotUnpublishTheSuccessfulWrite(t *testing.T) {
|
||||
s, _ := newMappedCheckpointStoreV3(t)
|
||||
f := newFakeChunkRemote()
|
||||
layer := mustAttach(t, s, f, ctConfig(1))
|
||||
newWriteLog().write(t, s, 2, 0x73)
|
||||
f.afterCAS = func(f *fakeChunkRemote) { f.failGet = errChunkHeadWriteRefused }
|
||||
if _, err := layer.Cut(ctTimeout(t)); !errors.Is(err, errChunkCASOutcomeUnknown) || !layer.Stats().PendingUnresolved {
|
||||
t.Fatalf("the write may be published despite the read refusal: %v; pending=%t", err, layer.Stats().PendingUnresolved)
|
||||
}
|
||||
if layer.RemoteLSN() != 0 {
|
||||
t.Fatal("an unconfirmed publication advanced the acknowledged frontier")
|
||||
}
|
||||
}
|
||||
@@ -2237,6 +2237,13 @@ func (l *chunkLayerImpl) captureInvocationLocked(ctx context.Context, detach boo
|
||||
persistCapturedMap(capturedVersions)
|
||||
return l.cutDone(chunkCutResult{H: h, Head: l.resultHead(next), FullHash: all}, detach), nil
|
||||
}
|
||||
if errors.Is(casErr, errChunkHeadWriteRefused) && !errors.Is(casErr, errChunkCASOutcomeUnknown) {
|
||||
// An answered pre-write refusal cannot land later. Keep reusable
|
||||
// uploads, but do not invent a pending proposal or a settlement wait.
|
||||
st.CASResult = "refused"
|
||||
l.requeueCut(all)
|
||||
return chunkCutResult{}, casErr
|
||||
}
|
||||
// Precondition or unknown outcome: resolve by re-reading HEAD, never by
|
||||
// a blind retry.
|
||||
keepPending := func() {
|
||||
|
||||
@@ -51,6 +51,7 @@ var (
|
||||
ErrCutCOWAborted = errCutCOWAborted
|
||||
ErrChunkKeyExists = errChunkKeyExists
|
||||
ErrChunkHeadPrecondition = errChunkHeadPrecondition
|
||||
ErrChunkHeadWriteRefused = errChunkHeadWriteRefused
|
||||
ErrChunkHeadDeleted = errChunkHeadDeleted
|
||||
ErrChunkLayerFenced = errChunkLayerFenced
|
||||
ErrChunkEvictRefused = errChunkEvictRefused
|
||||
|
||||
@@ -226,8 +226,9 @@ func chunkHeadIsDetached(h chunkHead) bool { return h.State == chunkHeadDetached
|
||||
// exists, or once existed, fails with errChunkKeyExists and never replaces
|
||||
// stored bytes. CASHead installs next only when the stored HEAD matches
|
||||
// expected and returns the new generation; a mismatch fails with
|
||||
// errChunkHeadPrecondition. Any other CASHead error leaves the outcome
|
||||
// unknown: the caller re-reads HEAD after every such result before any
|
||||
// errChunkHeadPrecondition. errChunkHeadWriteRefused proves this call made
|
||||
// no conditional write and preserves its typed refusal. Any other CASHead
|
||||
// error leaves the outcome unknown: the caller re-reads HEAD before any
|
||||
// further CAS, never retries blindly, and reports no success or frontier
|
||||
// advance while it is unresolved.
|
||||
//
|
||||
@@ -698,6 +699,7 @@ var (
|
||||
errChunkLayerNotImplemented = errors.New("storage: chunk layer not implemented")
|
||||
errChunkKeyExists = errors.New("storage: chunk key already exists")
|
||||
errChunkHeadPrecondition = errors.New("storage: chunk HEAD precondition failed")
|
||||
errChunkHeadWriteRefused = errors.New("storage: chunk HEAD write refused before publication")
|
||||
errChunkHeadDeleted = errors.New("storage: chunk HEAD is being deleted or deleted")
|
||||
errChunkLayerFenced = errors.New("storage: chunk layer fenced")
|
||||
errChunkEvictRefused = errors.New("storage: chunk eviction refused")
|
||||
|
||||
@@ -394,7 +394,7 @@ stateDiagram-v2
|
||||
CAS --> Settled: CAS ok, or a re-read shows the proposal
|
||||
CAS --> Pending: outcome unknown and HEAD unchanged
|
||||
CAS --> Fenced: HEAD moved to a superseding holder
|
||||
CAS --> Refused: HEAD moved otherwise (conflict)
|
||||
CAS --> Refused: answered pre-write guard, or HEAD moved otherwise (conflict)
|
||||
CAS --> Fenced: HEAD moved without superseding and changed the chunk root (foreign root)
|
||||
Pending --> Fenced: its settlement finds a foreign root
|
||||
Pending --> Admit: next cut settles it first
|
||||
@@ -403,6 +403,7 @@ stateDiagram-v2
|
||||
| Step | Guard | Enforced in | Protects |
|
||||
|---|---|---|---|
|
||||
| Admit | optional Budget admitted before staging/barrier; not closed, fenced, detached or installing a base; `CaptureAllowed` (healthy primary, unchanged lineage, valid lease) | `core/storage/chunk_layer.go` `admit`, `captureLocked`; `core/frontend/durable/provider_chunk.go` `newChunkLayer` (`CaptureAllowed`) | `INV-WS-LEASE-001`, `INV-CUT-PAYLOAD-BOUNDED-001` |
|
||||
| Answered HEAD refusal | the remote proves the conditional write was not sent; preserve the typed cause and reusable uploads, create no pending proposal. A refused re-proposal or confirmation read cannot decide an earlier uncertain write. | `core/frontend/chunkstore/layout_remote.go` `layoutRemoteErr`; `core/storage/chunk_layer.go` `captureLocked`; `core/host/volume/chunk_control.go` `chunkErrorCode` | `INV-WS-CAS-UNKNOWN-001`, `INV-SNAPK-HEAD-FORMAT-LEVEL-001` |
|
||||
| Settle pending | an earlier unknown CAS is resolved by re-reading HEAD before any new proposal | `core/storage/chunk_layer.go` `resolvePending` | `INV-WS-CAS-UNKNOWN-001` |
|
||||
| Stage | native remaining bytes above half the COW side cap trigger logical-read pre-copy straight to remote; repeat only while the remainder shrinks; legacy fixtures retain the chunk-count bound; the holder session begins before its first upload | `core/storage/chunk_layer.go` `stage` | `INV-CUT-INTENT-FIRST-001`, `INV-CUT-STAGED-REUSE-001`, `INV-CUT-PAYLOAD-BOUNDED-001`, `INV-CUT-READ-LOGICAL-001` |
|
||||
| Plain detach | plain=true acquires exclusive idle frontend admission (closed handles allowed), then StopIO and caller-bounded seal. Busy requests mutate nothing; publication and settlement retain authority/HEAD checks. | `provider_chunk.go` `DetachVolumePlain`; `storage_adapter.go` `stopPlainDetachIfIdle`; `chunk_control.go` `handleChunkDetach` | `INV-CUT-PLAIN-DETACH-001`, `INV-WS-HEAD-BELT-001` |
|
||||
@@ -1028,7 +1029,7 @@ Notes:
|
||||
| `INV-WS-REOPEN-FENCE-001` | Retired: the legacy same-holder reopen replaced HEAD generation. B fences by claim id and local-root lineage (`INV-SNAPK-START-ROOT-001`, `INV-SNAPK-START-CLAIM-001`, `INV-SNAPK-STALE-HOLDER-001`); an ordinary same-root reopen may leave HEAD unchanged. | legacy M4 | — | — | — | ARCHIVED |
|
||||
| `INV-WS-SEALED-REOPEN-001` | A same-epoch Start cannot reactivate a detached HEAD: it refuses before another HEAD update or serving, preserving its current root, position and detached state for a higher-epoch claimant. | M9 detached → higher-epoch idle | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/chunkstore/layout/claim.go` `Claim` | `TestCommitDetached_ProofAndLostReply`, `TestDetachedHEAD_RefusesEveryHolderTransition` (`core/frontend/chunkstore/layout/detached_test.go`); `TestRestoreEqualOwnerDetachedHEADStaysSealed` (`core/frontend/durable/provider_seed_order_test.go`) | `INV-SNAPK-DETACHED-001` | ACTIVE |
|
||||
| `INV-WS-SEAL-REPLAY-001` | A repeated plain seal, also after a same-epoch detached restart, succeeds only from a fresh B HEAD with exact epoch, holder and local claim id. It returns that HEAD/frontier without a new generation. An unreadable or mismatched proof cannot be answered from process memory. | B detached HEAD read | `core/frontend/durable/provider_seal_replay.go` `replayPlainSeal`, `readLayoutSeal`; `cmd/blockvolume/workspace_lease.go` `workspaceLayoutDetachedGeneration` | `TestLayoutPlainDetachReplayAfterRestartNeedsNoLegacyFactory` (`core/frontend/durable/provider_layout_plain_replay_test.go`); `TestWorkspaceLayoutDetachedProof` (`cmd/blockvolume/workspace_layout_proof_test.go`) | K1: detached proof belongs to the exact claim | ACTIVE |
|
||||
| `INV-WS-CAS-UNKNOWN-001` | An unknown HEAD CAS outcome is settled by re-reading HEAD, never by a blind retry; until it is settled the proposal stays pending and its session stays open; settlement replays the same commit in it. | M5 CAS → Pending | `core/storage/chunk_layer.go` `captureLocked`, `resolvePending`; `core/frontend/chunkstore/layout_remote.go` | `TestChunkLayer_C6_UnknownNotAppliedNeverClaimsSuccess` (`core/storage/chunk_layer_contract_test.go`); `TestSession_UncertainCommitIsNotAbortedUntilSettled` (`core/storage/chunk_layer_session_test.go`); `TestLayoutRemote_LostReplyOfTheFirstCutIsNotAFence`, `TestLayoutRemote_LostReplyOfALaterCutWithAnInheritedChunkIsNotAFence`, `TestLayoutRemote_LostReplyOfANoOpCutIsNotAFence` (`core/frontend/chunkstore/layout_remote_same_proposal_test.go`) | — | ACTIVE |
|
||||
| `INV-WS-CAS-UNKNOWN-001` | An unknown HEAD CAS outcome is settled by re-reading HEAD, never by a blind retry; until it is settled the proposal stays pending and its session stays open; settlement replays the same commit in it. | M5 CAS → Pending | `core/storage/chunk_layer.go` `captureLocked`, `resolvePending`; `core/frontend/chunkstore/layout_remote.go` | `TestChunkLayer_C6_UnknownNotAppliedNeverClaimsSuccess` (`core/storage/chunk_layer_contract_test.go`); `TestSession_UncertainCommitIsNotAbortedUntilSettled` (`core/storage/chunk_layer_session_test.go`); `TestLayoutRemote_LostReplyOfTheFirstCutIsNotAFence`, `TestLayoutRemote_LostReplyOfALaterCutWithAnInheritedChunkIsNotAFence`, `TestLayoutRemote_LostReplyOfANoOpCutIsNotAFence` (`core/frontend/chunkstore/layout_remote_same_proposal_test.go`); `TestLevelZeroCutRefusalDoesNotBecomeAnUnresolvedPublication` (`core/frontend/chunkstore/layout_format_refusal_test.go`); `TestARefusedReproposalDoesNotSettleAnEarlierUnknownWrite`, `TestARefusedConfirmationReadDoesNotUnpublishTheSuccessfulWrite` (`core/storage/chunk_head_refusal_test.go`) | — | ACTIVE |
|
||||
| `INV-WS-CLAIM-BEFORE-SERVE-001` | A new B holder claims HEAD at its issued epoch only after the local root is validated against the HEAD it updates; an older epoch or another holder at the same epoch is refused, and guest writes stay closed until assignment and claim. | M9 Start → Claim → Serving | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/durable/provider_layout.go` `startLayoutRoot` | `TestStart_ValidatesAgainstTheHeadItUpdates`, `TestStart_Refusals` (`core/frontend/chunkstore/layout/start_test.go`); `TestStart_TheClaimRechecksTheSeedRule` (`core/frontend/chunkstore/layout/start_seed_test.go`); `TestFreshStoreRefusesWriteBeforeAssignmentThenPublishesAfterClaim` (`core/frontend/durable/provider_restore_schedule_test.go`) | `INV-SNAPK-START-LINEAGE-001`, `INV-SNAPK-START-CLAIM-001` | ACTIVE |
|
||||
| `INV-VOL-GEOMETRY-FLAGS-RECORD-001` | A create-mode start whose `--durable-blocks`/`--durable-blocksize` disagree with the volume record exits 78 before any local store exists; an existing store is checked only at attach; an absent record keeps the create path; an unread record exits 75 (filer failed) or 78 (corrupt). | blockvolume startup (before the durable provider) | `cmd/blockvolume/main.go`; `cmd/blockvolume/chunk_remote.go` `geometryFlagsRefusal`; `core/frontend/chunkstore/layout/volume.go`, `start.go`, `create.go`; `core/frontend/chunkstore/catalog_b.go` | `TestGeometryFlagsRefusalComparesTheRecord`, `TestVolumeRequiresGeometry`, `TestVolumeGeometryChecksAndIsImmutable`, `TestStartGeometryMismatchPrecedesClaim`, `TestBCatalogRestoreCopiesVolumeGeometry`, `TestVolumeGeometryLivesOnlyInVolume` | K3: immutable required VOLUME geometry; Start checks the local persisted shape before claim; restores copy source geometry; no resize or compatibility path. | ACTIVE |
|
||||
| `INV-WS-STALE-LOCAL-ROOT-001` | An old or rolled-back local root is refused by `layout.Start` before serving; synchronous and deferred attach end without retry and report the typed stale-root error and cure. A fresh root at its own epoch likewise ends with `ErrMissingLocalRoot` and its cure. | M4 Claiming → Refused | `core/frontend/durable/provider_layout.go` `startLayoutRoot`; `core/frontend/durable/provider_chunk.go` `recoverChunk`, `chunkAuthorityWait`; `core/frontend/durable/provider_startup.go` `endChunkStartup` | `TestLayoutProviderRefusesEmptyOwnEpochAndRemountedOldRoot`, `TestFinalLayoutStartRefusalTable` (`core/frontend/durable/provider_layout_test.go`, `provider_layout_start_class_test.go`) | — | ACTIVE |
|
||||
@@ -1367,7 +1368,7 @@ Notes:
|
||||
| `INV-SNAPK-HEAD-CODEC-001` | HEAD is canonical JSON with at most 10 snapshots (`MaxSnapshots`) and sorted unique dependents; unknown fields, non-canonical bytes and names that are not valid UTF-8 are refused at encode and decode, and the next HEAD is checked before it is written. | M9 every transition | `core/frontend/chunkstore/layout` `head.go` `Head.check`, `Head.Encode`, `DecodeHead` | `TestHead_GoldenEncodingRoundTrip`, `TestHead_Refusals`, `TestHead_RefusesInvalidUTF8` | — (the snapshot kernel model is not in this repository) | ACTIVE |
|
||||
| `INV-SNAPK-HEAD-V11-VERSION-001` | Any HEAD carrying a v1.1-only field (a manifest size, ext) is version 1, and a v1.1 commit writes version 1 whether or not it knows the manifest size; a version-0 HEAD with one is refused. | M-snapshot commit | `core/frontend/chunkstore/layout/commit.go` `withManifestBytes`; `core/frontend/chunkstore/layout/head.go` `check`, `checkExt`; `core/frontend/chunkstore/layout_remote.go` (`CommitRequest.V11`) | `TestCommitRecordsTheManifestSize` (`core/frontend/chunkstore/layout/head_version_test.go`); `TestACommitByChangeKeepsAnUnknownSizeUnknown` (`core/frontend/chunkstore/layout_manifest_size_test.go`) | none | ACTIVE |
|
||||
| `INV-SNAPK-HEAD-V11-STAMP-001` | Every write that leaves a version-1 HEAD stamps each snapshot that has no publishing generation with that write's generation; a version-1 HEAD write with an unstamped snapshot is refused, reads stay tolerant. | M-snapshot commit | `core/frontend/chunkstore/layout/head.go` `runTransition`; `core/frontend/chunkstore/layout/snapshot_generation.go` `stampedForWrite`, `checkWrite` | `TestV11CutPublishesASnapshotThatCanBeDeletedByItsTarget`, `TestV11FirstCutStampsTheLegacySnapshots`, `TestVersion1UnstampedSnapshotIsRefusedOnWriteOnly` (`core/frontend/chunkstore/layout/snapshot_stamp_write_test.go`) | none | ACTIVE |
|
||||
| `INV-SNAPK-HEAD-FORMAT-LEVEL-001` | No HEAD write raises HEAD from version 0 to version 1 below format level 1 (a writer's level absent = 0), whichever writer tries; a HEAD already at version 1 stays writable at any level. | M-snapshot commit | `core/frontend/chunkstore/layout/format_level.go` `checkFormatLevel`, `WithFormatLevel`; `core/frontend/chunkstore/layout/head.go` `runTransition`; `core/frontend/chunkstore/layout_remote.go` `atFormatLevel` | `TestNoHeadWriteRaisesTheVersionBelowFormatLevelOne` (`core/frontend/chunkstore/layout/format_level_test.go`); `TestALevelZeroCommitCannotRaiseHeadToVersionOne` (`core/frontend/chunkstore/layout_manifest_size_test.go`) | none | ACTIVE |
|
||||
| `INV-SNAPK-HEAD-FORMAT-LEVEL-001` | No HEAD write raises HEAD from version 0 to version 1 below format level 1 (a writer's level absent = 0), whichever writer tries; a HEAD already at version 1 stays writable at any level. | M-snapshot commit | `core/frontend/chunkstore/layout/format_level.go` `checkFormatLevel`, `WithFormatLevel`; `core/frontend/chunkstore/layout/head.go` `runTransition`; `core/frontend/chunkstore/layout_remote.go` `atFormatLevel` | `TestNoHeadWriteRaisesTheVersionBelowFormatLevelOne` (`core/frontend/chunkstore/layout/format_level_test.go`); `TestALevelZeroCommitCannotRaiseHeadToVersionOne` (`core/frontend/chunkstore/layout_manifest_size_test.go`); `TestLevelZeroCutRefusalDoesNotBecomeAnUnresolvedPublication` (`core/frontend/chunkstore/layout_format_refusal_test.go`); `TestChunkFormatRefusalIsTypedWithoutHidingAnEarlierUnknownWrite` (`core/host/volume/chunk_format_refusal_test.go`) | none | ACTIVE |
|
||||
| `INV-SNAPK-BEGIN-001` | Begin opens snap(s) only for the holder at HEAD's epoch and only from idle; a re-run of the open session writes nothing; killed at its write and re-run, it ends in snap(s) at one generation step. | M9 idle → snap | `core/frontend/chunkstore/layout` `head.go` `Head.Begin`, `RunBegin` | `TestBegin_Closure`, `TestRunBegin_InterruptAtEveryStep` | — (the snapshot kernel model is not in this repository) | ACTIVE |
|
||||
| `INV-SNAPK-ABORT-001` | Abort closes the holder's own snap(s) and changes nothing else; after its own crash a holder rolls the open session back before beginning another; over idle Abort writes nothing and its success never says whether the work was committed. | M9 snap → idle (Abort) | `core/frontend/chunkstore/layout` `head.go` `Head.Abort`, `RunAbort`; `core/frontend/durable/provider_layout.go` `settleLayoutStop` | `TestLayoutStopAbortMustConfirmItsOutcome`, `TestLayoutRemote_AbortOpenSessionDoesNotWaitForAHeldCommit`, `TestLayoutRemote_AbortOpenSessionFencesAForeignHead`, `TestLayoutRemoteSessionFieldSites`, `TestAbort_Closure`, `TestAbort_IdleMeansNoActivityRemains`, `TestAbort_RollBackAfterOwnCrash`, `TestRunAbort_InterruptAtEveryStep` | — (the snapshot kernel model is not in this repository) | ACTIVE |
|
||||
| `INV-SNAPK-COMMIT-REACH-001` | A commit never names an unwritten object: before its HEAD update it finds present, written by its session or adopted from an earlier one of this volume, the own chunks new against HEAD's current root, every segment and the root; unchanged and foreign chunks are not looked up. | M9 snap → idle (Commit) | `core/frontend/chunkstore/layout` `commit.go` `RunCommit`, `CheckCommitObjects`, `Head.Commit`; the lookups run with the cut's budget before the bounded HEAD update (`layout_remote.go` `LayoutRemote.CheckCommit`, called by `core/storage/chunk_layer.go`), and the CAS skips them only for the (session, root) checked | `TestCommit_Closure`, `TestRunCommit_LooksUpOnlyWhatIsNew`, `TestRunCommit_RefusesUnwrittenObjects`, `TestRunCommit_StaleBaseAndLookupFailure`, `TestRunCommit_AfterAnEmptyPublishedRoot`, `TestRunCommit_InterruptAtEveryStep`; its verification is bounded parallel and stays all-or-nothing: `TestCommitVerifiesManyNewChunksWithinTheBudget`, `TestADetachingCommitOfManyNewChunksCompletesWithinTheBudget`, `TestCommitRefusesWhenOneOfManyNewChunksIsNotPrepared`, `TestCommitLookupsNeverExceedTheCap`, `TestACancelledCommitStopsJoinsAndWritesNothing`, `TestTheEarliestFailureByPositionDecidesTheError` (`commit_verify_scale_test.go`, `commit_verify_controls_test.go`); outside the 2 s update: `TestCutCommitsWhenItsObjectCheckOutlastsTheHeadUpdate`, `TestCASSkipsTheLookupsCheckedForItsSessionAndRoot`, `TestCASWithNoPassedCheckDoesTheLookups`, `TestCASAfterACheckOfAnotherRootDoesTheLookups`, `TestBeginCleanBetweenTheCheckAndTheUpdateIsBusy`, `TestAPreCheckThatFindsAChunkMissingEndsWithNoLookupInTheCAS` (`core/frontend/chunkstore/layout_commit_check_budget_test.go`); `TestObjectsCheckedIsWrittenOnlyByCASHead`, `TestCASAfterAnAbortAndANewSessionAtTheSameRootDoesTheLookups`, `TestCommitPendingSnapshotLooksUpTheRootAndSegments`, `TestMetadataRetryLooksUpOnlyWithoutAPassedCheck` (`core/frontend/chunkstore/layout_commit_check_guards_test.go`); through the provider's wrapped remote: `TestProviderCutCommitsWhenItsObjectCheckOutlastsTheHeadUpdate`, `TestProviderWrappedRemoteKeepsTheLayoutRemotesOptionalInterfaces` (`core/frontend/durable/commit_check_budget_test.go`); `TestLayoutRemoteUploadFinishedAfterSessionEndCannotCommit` (`core/frontend/chunkstore/layout_upload_concurrency_test.go`); also in `core/frontend/chunkstore/layout/commit_test.go` | — (the snapshot kernel model is not in this repository) | ACTIVE |
|
||||
|
||||
@@ -196,12 +196,12 @@ core/host/master/services.go services.deleteHolderEvidence context.WithTimeout 1
|
||||
core/host/master/workspace_service.go services.AckWorkspaceRevoked context.WithTimeout 1 236 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
core/host/master/workspace_service.go services.MoveWorkspace context.WithTimeout 1 355 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
core/host/master/workspace_service.go services.PreviewWorkspaceMove context.WithTimeout 1 623 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
core/host/volume/chunk_control.go chunkContext context.WithTimeout 1 570 pending-fix SnapOps.Start HTTP chunk handlers' default 5 min total (manual cut, snapshot, backup); fix #964 and its waiter follow-up
|
||||
core/host/volume/chunk_control.go StatusServer.handleChunkCut time.NewTimer 1 625 per-call CutTime.InProgress one POST observation answers by W or earlier on a sequence rise or terminal result; worker owns the independent cut window
|
||||
core/host/volume/chunk_control.go StatusServer.handleChunkDetach context.WithTimeout 1 797 pending-fix SnapOps.Start a cut waiter's fixed total; fix follows the cut window of #964 (one waiter PR for snapshot, backup, plain detach and stop)
|
||||
core/host/volume/chunk_control.go chunkControl.snapshotOperationAttempt context.WithTimeout 1 1031 per-call SnapOps.Start one RPC or request
|
||||
core/host/volume/chunk_control.go chunkControl.deleteSnapshotOperation time.Now().Add 1 1165 pending-fix SnapOps.Start unmeasured: the holder's snapshot-delete resume loop (30 s) around intent preparation; a measurement at the cap or a window is owed
|
||||
core/host/volume/chunk_control.go chunkControl.deleteSnapshotOperation time.After 1 1188 control-timer SnapOps.Start resume loop poll
|
||||
core/host/volume/chunk_control.go chunkContext context.WithTimeout 1 572 pending-fix SnapOps.Start HTTP chunk handlers' default 5 min total (manual cut, snapshot, backup); fix #964 and its waiter follow-up
|
||||
core/host/volume/chunk_control.go StatusServer.handleChunkCut time.NewTimer 1 627 per-call CutTime.InProgress one POST observation answers by W or earlier on a sequence rise or terminal result; worker owns the independent cut window
|
||||
core/host/volume/chunk_control.go StatusServer.handleChunkDetach context.WithTimeout 1 799 pending-fix SnapOps.Start a cut waiter's fixed total; fix follows the cut window of #964 (one waiter PR for snapshot, backup, plain detach and stop)
|
||||
core/host/volume/chunk_control.go chunkControl.snapshotOperationAttempt context.WithTimeout 1 1033 per-call SnapOps.Start one RPC or request
|
||||
core/host/volume/chunk_control.go chunkControl.deleteSnapshotOperation time.Now().Add 1 1167 pending-fix SnapOps.Start unmeasured: the holder's snapshot-delete resume loop (30 s) around intent preparation; a measurement at the cap or a window is owed
|
||||
core/host/volume/chunk_control.go chunkControl.deleteSnapshotOperation time.After 1 1190 control-timer SnapOps.Start resume loop poll
|
||||
core/host/volume/host.go Host.runRoleRetry time.After 1 550 control-timer FormatGate.Downgrade; FormatGate.Upgrade role retry delay
|
||||
core/host/volume/host.go Host.runHeartbeat context.WithTimeout 1 792 per-call FormatGate.Downgrade; FormatGate.Upgrade one RPC or request
|
||||
core/host/volume/host.go Host.runSubscribe time.After 1 962 control-timer FormatGate.Downgrade; FormatGate.Upgrade subscribe retry backoff
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 47 and column 127.
|
Reference in new issue
Block a user