- hostlimit: Config.FetchSlots (default 64, files fetch-0..N-1 in the pool).
HoldFetch takes a free slot without waiting, from the key's hash slot;
with every slot held it blocks on its hash slot (the kernel queues the
waiters) and tries the other slots every 20 ms, using whichever lock comes
first and releasing the other; its context bounds the wait, and a lock got
after that is released at once. lockBlocking on Unix and Windows.
- storage: BudgetFetch; fillOnce holds one slot across its remote read only
(a read miss and a hydrate-all fill alike); a context error on the wait is
the hydration path's pending, as before.
- blockvolume: --host-limit-fetch-slots. Invariants: INV-HOST-FETCH-CAP-001;
M7 states it. v1.1 notes carry it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
requeue is set by an admitted attempt that fails and cleared only by a
success: a wait, a refusal or a dropped ticket (a reconcile, a pause) leaves
it set, so every later ticket of the turn is taken at the host's now.
INV-HOST-TICKET-REENTRY-001 states it and names the test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the cut loop: an attempt admitted on its ticket that then fails retries on
a fresh ticket at the back of the queue (the host's now), never at its
schedule's earlier due time; a failed ticket creation is a wait (no cut,
the reason in status, the next poll tries again), never an un-ticketed cut.
- the limiter: an urgent admission refused after taking its urgent-pending
hold closes the hold, so no Normal admission stays refused for it.
- tests: the new concurrent tests and the ticket tests end their workers
with a bounded join on every path, a failing assertion too.
- invariants: INV-HOST-TICKET-REENTRY-001; the urgent row names its test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The change of this PR's 22 commits, carried onto current main as one
commit (its base was 1884 commits behind). Fitted to main:
- pacing: main's rule that fallback-only leases are not paced stays; a
healthy lease is paced at the budget over the held normal and urgent
slots (this PR's rule) instead of over the configured slot count.
TestFallbackDoesNotUnpaceAHealthyLease keeps its property (a healthy
lease beside a fallback lease is paced) with a 500 ms deadline, since a
lone holder now gets the whole budget.
- the cut loop keeps main's attempted hook and afterStaging (a failed
attempt that staged new chunks retries at the next poll), with the
ticket handling; the random retry delay is gone, as this PR intends.
- imports and constants: neither side's removed ones return.
- invariants: main's new rows and this PR's new and restated rows; the
slot-wait row is this PR's (ticket order, the next poll).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- expire decides and revokes in one step under the limiter's lock, reading
the last progress at that step: a progress report that completed before it
is always honoured.
- Progress takes no lock: it reads a lease index (sync.Map, kept with the
live set) and stores an atomic stamp, so it never waits behind an
admission's file-system work.
- the window runs on the monotonic clock: a stamp is time.Since of the
limiter's base, never a wall timestamp.
- the launch refusal of a pool written with other flags names
configuration.json and the cure (stop every process, remove it, start);
the v1.1 notes carry the hold change and the upgrade step; the upload
rate flag says the window must exceed one chunk's send time at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hostlimit: Config.MaxHold (a fixed 5-minute hold limit) becomes
NoProgress (default 60 s). Progress(id) records the work's progress, with
no OS call; the hold's one timer, when it fires, arms again for the rest
of the window if the work progressed, and revokes otherwise. A hold whose
work keeps progressing is never revoked; a stalled one is revoked within
the window.
- blockvolume: --host-limit-no-progress; --host-limit-max-hold stays as a
deprecated alias of it.
- storage: BudgetProgress, the optional Budget that renews a hold; a cut
attempt reports one unit of work per chunk compared, staged or uploaded.
A hydrate-all holds one permit per chunk fill, so its hold is one fetch.
- invariants: INV-HOST-HOLD-NO-PROGRESS-001; M7 states the rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The diagram gains the Recovering -> Serving edge of the v1.1 attach's
upgrade, and the table its row: whole local chunks Rebuilt all, Hash,
Commit to HP with HEAD's hash only when the clean-stop proof holds (the
claim's own HEAD a committed, idle detach; the store's lineage; the store's
synced position), unknown otherwise; linked to INV-CHUNK-RECORD-SEED-001,
whose machine column now names the same transition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- layout: LocalRoot.ReportCleanStop is told, on each attempt of the claim's
own check, whether the HEAD the claim is built on is a committed, idle
detach (DetachedBy) carrying this root's claim id; the committing
attempt's report is the last. Never judged on Start's first read.
- durable: startLayoutRoot returns that clean stop; the provider carries it
into ChunkLayerConfig.CleanStop.
- storage: upgradeChunkRecordSeeded seeds only an unmarked store whose
layout claim id is the proof's and whose synced position (the pages'
valid-through) is the proof's; the attached HEAD at another position is
logged and never seeded on. A whole local chunk steps Rebuilt all, Hash,
Commit and takes HEAD's hash (a chunk HEAD does not name: the zero
chunk's). The upgrade's order is unchanged.
- invariants: INV-CHUNK-RECORD-SEED-001.
- tests: the attach takes the proof from its config
(TestV11AttachSeedsFromTheCleanStopInItsConfig); startLayoutRoot reports
it (TestStartLayoutRootReportsTheCleanStop).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A unit journal read whole with no records in the window (or a command
the host does not have) is only unavailable; only the command's own
failure (cut, nonzero exit, truncated) makes the bundle unproven. Two JSON
keys that collide once sanitized are no longer told apart by a suffix,
which could itself be a known credential and cost quadratic probes: that
artifact is withheld as not proven, checked after its redaction.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A declared log file refused before discovery (not a regular file, changed,
over 4 MiB, not text, unreadable), a process whose arguments could not be
read, and a failed or truncated unit command each make the bundle
manifest-only, not only a unit cut by the time budget. A missing file or a
gone process holds nothing to discover and stays only unavailable. In an
unproven bundle every artifact error is replaced by a fixed one, and the
skipped names are printed sanitized. A known credential used as a JSON
object key is redacted too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ErrHeadNewerVersion now wraps ErrMalformed: every caller that refuses a
malformed HEAD for good refuses a newer one the same way (Start stays a
final refusal, never a retry loop), and its text says to use a newer
binary. The Start classification table pins it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A commit by change subtracts only the touched segments its new root no
longer names: a shard whose segment came out unchanged stays in the size.
HEAD's ext must be a JSON object in its canonical bytes, on encode and
decode, so it round-trips byte for byte. The format doc states the
upgrade order (version-aware readers before any v1.1 writer) and that the
fullest-HEAD figure is a sizing check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the v1.1 format a full commit writes the sum of its root and segments
as HEAD's current_bytes and the named snapshot's manifest_bytes. A commit
by change subtracts the base root and the replaced segments and adds the
new ones, with no lookups; an unknown size stays unknown. Snapshot
listings report manifestBytes, null when unknown. The format doc states
the ext contract; a test bounds the fullest HEAD under the inline limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SeaweedFS names a full store only to the assign that tries to grow a
volume, so one object's retries and a cut's upload batch keep that answer
over plainer failures. A real-weed integration test fills a tiny store and
checks every round of concurrent uploads answers remote_full. The ledger
gains the remote_full and LastCutFailure rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SeaweedFS's assign answer for a store with no writable volume and no free
volume slot is classified as ErrChunkRemoteFull on both assign paths; the
routes answer it as remote_full (503, retryable after capacity is added),
apart from remote_unavailable. Every failed cut, requested or scheduled,
sets the layer's LastCutFailure (code, cause, time, repeats), cleared by a
success; the holder logs one WARN per change of code, not one per retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replacing section 1.3 also deleted the sections after it (1.4 Durability
and Sync, 1.5 Authority, 1.6 Replication and failover) and the 1.7
heading; they describe walstore and the shipped protocols, not the removed
engines. Restored verbatim from main; only 1.3 changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The provider refuses the removed names and, under every selector and
before any selector comparison, a volume carrying their magic (SWAW;
SWPW in either header slot), reading the file read-only and never
modifying it. blockvolume --durable-impl and the launcher refuse the
names with the same advice; the chart schema allows walstore only.
- core/storage/smartwal, core/storage/parallelwal and
cmd/sw-block-testutil (whose one command corrupted smartwal records)
are deleted, with the helm smartwal-corruption scenario and the
parallel-walstore gate script.
- The replication harness runs on walstore; tests that ran on a removed
engine only because a stub needed some store move to walstore, and the
state_convergence label test moves to the in-memory BlockStore.
- sw-block cluster.check drops the removed engines' cases.
- Ledger: INV-OPEN-REMOVED-ENGINE-REFUSED-001 and
INV-OPEN-REMOVED-ENGINE-NAME-REFUSED-001, an OpenRefused edge in M1, and
the rows citing the removed tests updated. Docs: block-design 1.3 now
describes the removal, the smartwal deep-dive and figure are gone, the
scripts default to walstore, and the v1.1 notes carry the removal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>