Change rule 7 and table C.L: one row per fixed time limit around work that
grows with the volume, with what runs inside it, what runs outside it under
progress, and its test; three start-path and control rows are STUB until
measured. The unchecked commit is a stated gap kept true by a guard that
classifies every HEAD commit site of the chunk layer and requires the
object check before the cut's commit. Comments at the commit step's lookups
and at the HEAD bound's default mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first attempt is ended both by a real context deadline and by a cancel,
and must return within a bound. The next attempt's HEAD is read back: every
one of the 262,144 chunks named with its written bytes, the frontier, and
every chunk the first attempt uploaded; a control drops one of those and is
refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check only reads the PR description and the changed-file list. On the
self-hosted runners it waited behind full test jobs for over an hour and held
back merges whose tests had already passed. Hosted jobs in this repository
start within about a minute.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 262,144 changed chunks, a cut whose context ends after a third of its
uploads leaves HEAD unchanged; the next attempt uploads only the chunks not
yet uploaded and sends none again. Fails when uploads are not remembered
across attempts (the next attempt uploads all 262,144).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2 s HEAD bound wrapped the holder's whole commit call, including the
preparation that grows with the chunk count (manifests, root and segments).
A remote that reports BoundsHeadStep now gets the caller's context plus a
step budget and applies it around each attempt's HEAD read and conditional
write; other remotes keep the whole call bounded. The layout remote reuses
the passed check's prepared request for every attempt of its session, so no
manifest is read and no root rebuilt after the check. The foreign-reference
selection looks at the first two owners only. The provider's wrapper
forwards BoundsHeadStep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 1 TiB commit (262,144 chunks) spent 2.47 s inside the 2 s HEAD update
re-deriving the base root and re-scanning the manifests, and its retry did
it again. PlanCommit now computes everything a commit needs from the
request alone (root, segments, base root, the owners of the changed
entries for the foreign-reference check, and the objects to look up)
before the update; the update step only checks the replay, the base, the
owners and writes. CheckCommit plans on the cut's budget and CASHead
reuses that plan and the passed check on every attempt of the same open
session (matched by manifest equality); the check is no longer dropped
before the commit, so a re-proposal after an unknown outcome looks up
nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main now has a test (from the refused-restore change) that commits a HEAD
through layout.RunCommit; with the cause argument it passes
layout.CauseCommit. Test only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The scan now covers package-level initializers, refuses
any writer referenced as a value (a method value or expression), accepts
a forwarded cause only in the four census forwarders and only while it
is never reassigned or redeclared, and refuses a writer call with
another argument count. Negative controls on synthetic source cover each
escape. The store test runs each refusal on a fresh directory, counts
filer write calls, and follows each with a success control under the
right cause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A HEAD is written by three store calls: the conditional update (only
through runTransition), the exclusive create, and the tombstone. Each now
takes a typed HeadWriteCause, one value per row of the HEAD writer
census, so a writer without a row does not compile. The transitions that
serve one row pass it; RunAbort, RunEndClean and RunCommit, which serve
several, take it from their caller. The layout store refuses a cause
outside the census, a first HEAD not written as create and a tombstone
not written as tombstone. No behaviour changes otherwise.
TestEveryHeadWriteIsACensusRow scans the production source: every HEAD
write names a census constant or forwards its function's cause, and
every row has a writer (both directions); it logs the writers by row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New volumes stay at 256 GiB unless the v1.0.1 release note raises the limit; the restore-target exception applies when the product loop is on (interval above 0); the downgrade hazard says the commit check can run past v1.0.0's limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miniVolumeSpec, volumeSpec's args and env, and volumeStart read or write
the layout id; each is listed with the test that probes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. activating, deactivating and reloading may have a live
holder (reloading is an active unit): the guest read and the cut stay,
refusing when the holder is down, and --force --no-cut stops the unit. A
cut's success answer must carry cutLSN and headGen (LSN 0 is an empty
volume's); without them the outcome is unknown. The lost-answer fake now
records its publication, and the refusal reports that confirmed cut.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. A unit is stopped only when systemctl reports inactive
or failed; a state it cannot report certifies nothing (stop refuses,
--replace refuses), and --replace is refused over a transitional unit.
start waits for FrontendPrimaryReady for its volume, not Healthy alone,
and names the not-ready reason. Only a complete success answer for the
volume is a cut: a lost answer, a truncated or foreign answer and
outcome_unknown are unknown outcomes (the cut may have published) and
refuse. The refusal reports the last confirmed cut, never that the
recovery point did not move. The flags the unit passes beyond mini's are
listed and classified.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. Only an inactive or failed unit is nothing to stop; a
unit systemd is restarting (activating, deactivating, reloading) is
stopped without a guest read or a cut, and the output says no cut was
taken. The time in the closing sentence is read before the cut's
request, so the cut covers every write before it. A timed-out cut's
refusal says its progress is kept; the help and the page say how to add
a new volume until volume start can create one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
volume start runs an existing volume as sw-blockvolume@<volume>: it
writes the unit's settings file, resolves the layout id, enables and
starts the unit, waits until it serves, and prints the connect command.
volume stop refuses while a guest is connected (unless --force), takes a
cut, refuses when the cut failed or its outcome is unknown (unless
--no-cut, giving the recovery point's age), stops the unit, and ends
with what it promises: the recovery point in the object store is the
cut; writes after it are on this host only.
mini and the unit share one blockvolume settings builder; a test renders
the settings through the shipped unit and compares them with mini's
flags. A second supervisor on one durable root is refused (guard test).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The template unit takes the volume id from its
instance name, so a settings file cannot name another volume (a fourth
per-instance directive, kept by the drift test). /status/guests and its
schema say what it is: the counted frontends (NVMe/TCP, iSCSI) only; an
absent frontend is not served or not counted; a vanished host stays
counted until TCP closes; 0 is not proof that nothing uses the volume.
The endpoint test's callbacks use atomics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What volume start and volume stop need, before the commands.
/status/guests?volume=<v> reports the guests connected now through each
frontend served: NVMe/TCP hosts (live admin controllers) and iSCSI
initiators (Normal sessions past login; Discovery sessions do not count),
read at request time, and their sum.
deploy/systemd/sw-blockvolume@.service runs one volume per instance
from /etc/sw-block/volumes/<volume>.env with its own state directory;
apart from three per-instance directives it is sw-blockvolume.service,
and a test keeps the two the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove unnamed roots, segments and chunks through one conditional mark/delete writer. Resume chunk cursors after bounded passes; re-plan metadata first and retain the session initial root set through operator snapshot deletes. Add a local trigger of the existing snapshot schedule for qualification.
A v1.0.0 holder of a volume above 256 GiB is unsupported (its commit check can run past its limit), not unable to serve; the restore-target refusal holds while the product loop is off; cluster.check runs from a v1.0.1 sw-block and reports a v1.0.0 holder's version as unavailable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockmaster before any host (the reverse is not supported); no volume above 256 GiB until every host runs v1.0.1; a restore target in the cluster spec first; cluster.check reports an older build for a v1.0.0 holder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: add a filer_ttl job that walks filer.conf TTL paths
A filer store without native TTL keeps the rows of expired entries until
something looks them up or lists their directory. The job lists every
TTL path subtree once per filer store, so the filer drops the expired
rows it meets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: register the filer_ttl job in the lifecycle lane
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: re-check an expired entry under its path lock before a listing deletes it
A listing deleted the expired entries it collected by path after the page
was read, so a write that replaced one in between lost its new row. The
delete now re-reads the row under the lock writers take, and in one
conflict-checked transaction on stores that refuse a commit over another
writer's change; anything but a still-expired row is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: read each filer store's own filer.conf, chunk-backed included
Filers with separate stores keep separate filer.conf files, so one
filer's rules could hide another store's TTL paths. A config stored in
chunks read as empty. An unreadable config now fails the detection
instead of reading as no rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* command: count filer_ttl among the mini default job types
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: resume an unfinished filer_ttl walk from its checkpoint
The walk position is saved in the job's filer store every 30s and at
the first failure, keyed by store signature, and cleared when a pass
completes. The next run skips the prefixes and subtrees already walked,
unless the TTL prefix set changed or the pass is over 7 days old.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: save the filer_ttl checkpoint as soon as a walk fails
The first failure froze the checkpoint but only the end of the run saved it,
so a worker killed while walking later prefixes lost it. stop now saves it at
once; the end of the run saves again only if that save failed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: keep a path TTL rule from expiring the filer_ttl checkpoint
A filer.conf TTL rule over /etc/ gave the checkpoint that rule's TTL, so an
interrupted pass could lose its record long before checkpointMaxAge. The
checkpoint is now written with its own TTL of checkpointMaxAge, which the
filer keeps instead of the rule's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: remove a filer_ttl checkpoint the new pass will not resume from
An overwrite keeps the stored entry's Crtime, and the checkpoint's TTL counts
from it, so a pass that replaced a rejected record could lose its own record
before checkpointMaxAge. load now deletes a record it rejects, and the new
pass creates a fresh one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: expire filer_ttl entries from metadata events per TTL rule
Each run replays every filer.conf TTL rule's metadata events from that
rule's cursor up to the run start, and looks up each entry whose TTL has
passed so the filer removes its row. The first entry not yet due holds the
rule's cursor, so a later run replays it. A rule without a cursor, or
whose TTL changed, is listed once to reach rows older than its replay
window. The periodic full walk and its checkpoint are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: re-check an S3-expired entry under its path lock before a listing deletes it
A listing deleted an S3-expired object by the row it had read, so an upload
that replaced it after the page was read was removed. The delete now re-reads
the row under the path lock and removes it only if it is still S3-expired.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: remove an expired row a lookup meets in a conflict-checked transaction
A lookup that met an expired row deleted it by path, so a replacement written
through another filer between the read and the delete was lost, even on
stores that refuse conflicting commits; a failed delete was hidden behind not
found. The lookup now re-reads and deletes through deleteIfExpired and returns
the delete error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: keep a failed filer_ttl lookup that ties a done event
When the first event at a timestamp was done and the second one's lookup
failed, the cursor already stood at that timestamp, so the retry subscribed
after it and skipped the failed event. A failed lookup now holds the cursor
below a tie, as a waiting entry does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: hold a filer_ttl event whose entry the filer still serves
A lookup that returned the live entry counted as done, so when the worker's
clock ran ahead of the filer's near the deadline the event was skipped and
the row stayed. An entry the filer still serves with the same deadline now
holds the cursor like one not yet due.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: keep a path TTL rule from expiring the filer_ttl cursors
The cursors were written without a TTL, so a filer.conf TTL rule covering
/etc/seaweedfs/filer_ttl gave them the rule's TTL and every rule was listed
again once they expired. When a rule covers them they are now written with a
TTL of their own, which the filer keeps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: list a filer_ttl rule again for a live entry its replay cannot reach
A new rule nested under a longer one started its replay one TTL back, so a
live entry the enclosing rule had stamped with its longer TTL, written before
that, was in neither rule's replay: the nested rule now owns it and the
enclosing rule skips it. The listing of a new rule now records the earliest
deadline of such entries, and the rule is listed again then.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: hand a removed filer_ttl rule's replay to the rule enclosing it
When a nested rule was removed, its entries became the enclosing rule's, but
that rule's cursor could already be past their events, so they were never
replayed. The enclosing rule now replays from the earlier of both cursors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: list a filer_ttl rule whose unfinished events the filer no longer keeps
When fs.log.purge removed the event of an entry still waiting for its TTL,
the rule's cursor matched, so the rule was never listed and the replay never
met the entry again. A rule whose cursor is older than the oldest kept
metadata log is now listed, and its cursor moves to that log. The cursor also
records how far a replay read with nothing left waiting, so a quiet rule is
not listed just because old logs were purged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* worker: leave S3 lifecycle expiry to the s3_lifecycle job in filer_ttl
An entry whose TTL an S3 lifecycle rule set carries the S3 expiry flag;
s3_lifecycle evaluates and removes it. filer_ttl no longer looks such
entries up, and their deadline no longer holds a TTL rule's cursor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>