The line was published at the data and control addresses the caller sent
(CLI flags, or the Kubernetes object's fields): a typo or a writer of that
object could make the fenced replica primary at an endpoint clients never
reach. The runtime now requires the master's own record of the target
(its fresh heartbeat slot, else its placement) and refuses a request whose
addresses differ, or a target with no record, before the gate runs, so a
refused request fences nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inside an epoch, a live entry above the store's next LSN is refused and
the connection closed; the primary's catch-up from the barrier end then
applies the gap in order. Fixtures that shipped hand-picked LSNs now ship
at the store's next LSN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: the catalog reader converted the entry's seconds to nanoseconds
without a range check, so an out-of-range mtime (year 9999) wrapped to a
negative time where the HTTP reader had reported it unknown (0). The
conversion is guarded; the master reader's refusal table has the
out-of-range case again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer, mount: keep a hard-linked file to one link id and count its names on the filer
A hard link's bookkeeping was done by the client. To link a file a mount
reads its entry and sends two writes, an update of the source and a create
of the new name, both with a link id and a count of the file's names. Two
clients that link one file at the same moment each worked from the entry
as it was before the other's writes:
- With no link id on the entry yet, each made one up. The second update
moved the source to its id, the store took the name off the first, and
the first client's new name was left alone on it: one file's chunks
under two link ids.
- With a link id there, both read the same count and sent it plus one.
The record counted one name fewer than the file had. Any write through
a name carried the client's copy of the count and replaced the record
the same way.
Either way the delete of the last counted name deleted the record and the
chunks while another name still read them.
The filer's own store now counts the names of a hard-linked file itself
(countLink): one more when the name written did not hold the link before,
the same when it did or when a rename moves it there (WithMovedLink), one
for a record that starts. The count sent is not used, and the entry gets
the count stored, so the response and the event carry it. The lookup of
the name, the count, the record and the name are stored as one change of
the record (changeLinkRecord), which DeleteHardLink goes through as well:
under a lock per link id, and in a transaction where the store refuses a
commit over a change made since it began, run again when it does. A
wrapper around a copy of some entries, such as a mount's metadata cache,
sees only some of the names and stores the count it is given.
UpdateEntry refuses to give a name that holds a hard link another link id
that no file has yet (refuseSecondHardLink). The mount sends a file's
first link's update as a unary RPC, which keeps that refusal apart from
an I/O failure, reads the entry again and links under the id the file has
by now.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* filer: take a replicated update's link id without refusing it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: look a path-specific name up outside the record's transaction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: check the leveldb open and close it in the hard link test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: send a refused first link again from the entry as stored
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: keep a first link's refusal over the next filer's error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: count a hard link's names next to the clients' count instead of in its place
The filer's count replaced the one clients send, which lost two things
that count did by being worked out ahead:
- A link's first write, the update of the source, carries the count with
the new name in it already. While the second write is on its way that
kept a delete of the source from being taken for the delete of the
file's last name (lastLinkDropped goes by the count it read), and the
chunks from being deleted under the name about to come. Counted only
when it arrived, the new name was stored with chunks that were gone:
104 of 300 rounds of a mount linking a file while another deletes it.
- A write of a name the store refused had counted the name already, and
sent again counted it once more.
The filer now keeps its count of the names in a key of its own next to
the record (linkNames), written once the name is stored, and the record
gets whichever is higher: the count the client sent or the names counted.
It is never lower than what the client alone would have left, and never
lower than the names the file has. A record from before has its count
recorded as the names when it is first written again.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* mount: send a refused first link again with the file's inline content
The second attempt builds the new name's create from the entry as the
filer has it by now: attributes, chunks and extended attributes. A file
the filer keeps inside its entry has its bytes in Content, and the create
is what the filer writes the link's shared record from, so without them
the record lost the file's content.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* filer: store a path-specific name before the record's lock is let go
A second create of the same new name on this filer took the lock between
the first one's count and its name write, missed the name, and counted it
again: the file's record and chunks then outlived its last name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: keep a link's names key out of the keys of a directory's entries
The key began with the link's random id. One that began as the root's
entry keys do in a store keyed by path put the names' 4 bytes in the
root's listing, and it failed to decode: listing / and the etcd scan
under fsck failed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: record a hard link's name before it is stored, and take it off if it is not
The names counted for a hard link were recorded once the name was stored.
On a store without transactions a failure of that write left the name
stored and not counted, and the write sent again found the name there and
did not count it either: the names recorded stayed one below the names
stored, the side a file is deleted under a name from.
They are recorded first now, inside the change of the record that counted
them, and a name the store then does not take is counted off again
(storeCountedName). A failure halfway leaves them one above the names
stored, and the file leaked. A name in a path-specific store is recorded
with the record as well, and counted off in a change of its own.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* filer: keep a hard link's name counted when a failed write stored it
A write whose deadline passes after the store took the name returns an
error, and counting the name off then left the names one below the names
stored. A later write with the count from before the link lowered the
record to them, and the file was deleted under a name it still had. Read
the name back first, and keep it counted where that cannot be told.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: carry the stored RemoteEntry into the name a retried first link adds
The retry rebuilds the new name from the entry the file has once another
client linked it, but kept the RemoteEntry of the entry first read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: MapleWhiteZZZ <18653045+MapleWhiteZZZ@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
v1 reads HEAD through the layout catalog. A unit or script that still
passes the removed flag is refused at start with a typed error
(errRemovedInV1) that names the replacement, --chunk-filer and
--chunk-path, rather than Go's generic unknown-flag message; the flag
is never accepted and ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sw-block ops failover is the operator's failover of a standalone
deployment: one call to blockmaster's admin-only FailbackService over
mutual TLS with the expected current line, after the operator confirms the
old node is off or cut from its clients. blockmaster decides the move.
The alpha stack now deploys what its notes describe: blockmaster serves
the failback RPC, and the failback executor (admin client Secret,
execution on) runs in kube-system; install applies the CRD and executor,
uninstall removes both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 'starting' latch could outlive a frontend that opened and failed
between two samples, excusing a real failure. It is gone: the probe answer
reads the replica-store wait before its readiness (the frontend gate reads
the same value), so a not-ready answer names the wait only if the wait
held, and a stores-complete assignment opens the frontend only after the
peers' expected stores are installed. The gate is a guard in the ledger
(INV-PROMOTE-CREATION-WAIT-001); the probe round's copy of the field is
tested on the wire.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test/s3: result checker for rclone fstests
* test/s3: run rclone fstests against SeaweedFS with expected failures
* ci: add rclone fstests workflow
* test/s3: catch parent-only failures and panics in rclone fstests check
* test/s3: check parent assertions and skips in rclone fstests, widen paths
* test/s3: drop issue numbers from the rclone expected-failures notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Konstantin Lebedev <whitefox@mayflower.work>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(remote_storage): add a Yandex Disk backend
Yandex Disk joins s3/gcs/azure as a remote storage type, so it can back
remote mounts and sink replication (filer.remote.sync, filer.remote.gateway)
without a separate sink.
The Disk API has no buckets and no place for a file's mtime: a top-level
folder under yandex_root plays the bucket, and the entry's modification time
and content encoding travel as custom resource properties (seaweedfs_modified,
seaweedfs_content_encoding; rclone_modified is read too). The client also
handles the API's asynchronous operations (202 + operation polling), the
short-lived, single-use download links (a fresh link per read and per retry),
single-PUT uploads, mkdir -p of an S3-style key's parents, server-side copy
for a remote-only rename, and a ranged read that refuses a short body.
A caller-supplied endpoint goes through the guarded client like the s3 and
azure endpoints.
* feat(shell): configure and issue Yandex Disk tokens
remote.configure gains the yandex flags (token, client_id, client_secret,
root, trash, app_folder, endpoint). A refreshable token is issued in two
steps without a browser on the server: -yandex.oauth_url prints the
authorization url and keeps the app credentials, -yandex.code exchanges the
copied code for a token and stores it. The token and the client secret are
masked in the configuration listing.
docs/remote-storage-yandex.md walks through the OAuth app, both token flows,
the mount and replication commands, and the platform's limits.
* fix(remote_storage): handle missing Yandex folders on stat, copy and upload
A missing object is confirmed against the bucket folder rather than its
immediate parent, as the gcs client does: a key whose subfolder does not
exist yet (a rename destination) is a missing object, not a vanished mount,
and the sync only proceeds on ErrRemoteObjectNotFound.
CopyFile creates the destination's parent folders, so a remote-only rename
into a folder the remote does not have yet succeeds. The Disk API answers a
missing parent with 409 DiskPathDoesntExistsError; upload and copy treat it
like a 404, and the fake answers the way the API does.
An operation poll refreshes the token once on 401 and then fails, instead of
polling without a pause until the operation deadline.
* fix(remote_storage): retry a locked Yandex resource
A folder that is still being deleted asynchronously answers a write with
423 DiskResourceLockedError for a moment. The client now retries it with the
same backoff as 429/5xx/509, and the error stays transient for the sync's
upload retry when the client's retries run out.
* fix(remote_storage): harden the Yandex backend after review
Traverse reports objects only, like the s3, gcs and azure clients: its
callers (remote.cache, remote.copy.local) read the stamp of every entry, and
a folder came with none.
Deletes no longer reach what they were not meant for. A Disk API delete is
recursive, so DeleteFile keeps a folder that took a file's place on the
remote, and DeleteBucket removes an empty bucket folder only, the rule S3 and
GCS apply to a bucket.
CopyFile keeps the destination until its replacement exists: it copies with
overwrite and removes the old object (to the trash when configured) only when
the service kept it anyway. It refuses to replace a folder, treats a copy
onto itself as done, and carries the source's resolved modification time,
including rclone_modified and the service's own time.
Every metadata request and operation poll has a deadline that covers
reading the answer, and a token refresh or code exchange has its own, so a
stalled endpoint cannot block the client. Redirects are checked like the
transfer links, an endpoint that would send the token over plain http is
refused unless it is on a loopback host, a 202 without an operation link is
an error, and a read with an offset and no size starts at the offset.
* chore(seaweed-volume): keep only the Yandex fields in the remote.proto copy
* yandex: retry a failed operation poll
One throttled, failed or timed-out status poll ended a wait of up to 30
minutes while the operation kept running on the service, so a large
delete or copy was reported failed and redone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* yandex: refresh a token once for concurrent 401s
Every request rejected with the same access token replaced the token
source, so N concurrent 401s refreshed, and rotated the refresh token,
N times.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* yandex: retry an operation poll whose answer was cut short
A status poll that got its 200 headers but lost the connection before the
JSON body ended failed with io.ErrUnexpectedEOF, which the poll retry did
not treat as transient, so the wait ended while the operation kept running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Konstantin Lebedev <whitefox@mayflower.work>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The master read HEAD two ways with two settings: the layout catalog
(filer gRPC, --chunk-filer) for create and restore, and plain filer HTTP
?metadata=true (--workspace-head-base-url) for the workspace move admission
and the revoke ACK. The workspace reader now reads through the catalog it
already dials: BCatalog.ReadHeadObserved returns HEAD, decoded by the same
DecodeLayoutHeadEntry, with the entry's modification time from that same
lookup (seconds, as the HTTP metadata gave it). The proof mapping is
unchanged: identity from the master's lifecycle record, deleting, unclaimed,
detached, generation, epoch, holder and position; an absent HEAD refuses
with ErrHeadAbsent.
The HTTP reader and --workspace-head-base-url are deleted, with the unit's
and the env file's setting and the docs. The master tests run the same
refusal table against a catalog on the in-memory filer (the HTTP-only
redirect and envelope cases have no counterpart). The fixtures that passed
the flag give the master the filer flags instead; the head-size and F1
ladder masters had none and could not dial the catalog at all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: keep a file's inline content when it is written to or resized
A small file the filer keeps inside its entry (-saveToFilerLimit, or
?saveInside=true on the upload) has its bytes in the entry's content and
no chunks. A mount dropped the content at the first write to the file, or
copy into it, and published the write's chunk alone: the bytes the write
did not cover read as zeros from then on, for an append as for two bytes
in the middle. A change of size left the content as it was. Grown, the
file read no further than its content on the mount and as zeros through
the filer; cut and grown again, it had the bytes that were cut off back.
The content now becomes a write of the handle's own, older than the one
about to change the file, and is flushed with it as a chunk
(bufferInlineContent: Write, CopyFileRange, Fallocate). SetAttr cuts it to
a smaller size, and stores it as a chunk before the file grows past it
(resizeInlineContent).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* mount: store resized inline content in chunks of the mount's chunk size
A file that grows past its inline content had the content stored as one
chunk, whatever its length, where a buffered write is split at the
mount's chunk size: content longer than a volume server takes in one
upload could not be stored, and the file could not grow.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: MapleWhiteZZZ <18653045+MapleWhiteZZZ@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
The operator's fencing round may fence survivors above the line whatever
it decides, and an allowed decision may still fail to publish: the fence
is now pending from the attempt until a line reaches its epoch. The
unsupported gate continues the line's own primary at e+1 on a pending
fence before any candidate check, as the supported gate does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: carry a file's inline content into the name a hard link adds
A small file the filer keeps inside its entry (-saveToFilerLimit, or
?saveInside=true on the upload) has content and no chunks. To link it a
mount updates the source and creates the new name, and the filer writes
the link's shared record from each of the two. The create carried the
source's attributes, chunks and extended attributes but not its content,
so the record was left with a size and nothing behind it: both names read
zeros from then on, through the mounts and through the filer.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* mount: carry a remote-only file's RemoteEntry into the name a hard link adds
A file under a remote mount that is not cached yet has no chunks and no
content; its RemoteEntry is what sends a read to fetch the object. The
create of the new name left it out, so the hard link's shared record lost
it and both names read zeros.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: cache a remote-only file before a hard link gives it a new name
The filer resolves a remote object from the name a read goes through, and
the new name has no object of its own, so a read through it failed until
the source name had been read. The link now has the filer cache the
object first, so every name shares its local chunks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: cache a linked remote-only file through its open handle
The cache moved the stored entry off the base of a handle open on the
source, so the handle refused the link change and its next flush failed.
A handle with buffered writes now publishes them first, and the cache
goes through the handle as a read does, which moves its base along.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: MapleWhiteZZZ <18653045+MapleWhiteZZZ@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
* s3: abort in-flight requests whose access is revoked
S3 checks access when a request starts, so a download or upload that
started before an identity, policy or bucket policy change runs to its
end. With -s3.abortRevokedRequests the gateway re-checks the requests it
is serving after such a change and aborts the ones now denied: an
HTTP/1.x request has its connection closed, an HTTP/2 request is
canceled.
The re-check looks the identity up again and repeats only authorization,
not the signature check, so clock skew or an expiring presigned URL never
cuts a long transfer. Off by default.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* s3: check revoked requests against whole reloads and configured identities
- A re-check pass holds reloadMu, so it never sees identities installed
before their policies are synced.
- STS and JWT sessions are not tracked: re-validating their token checks
its expiry, which a re-check cannot tell from a revocation.
- A request whose access changed while it was being admitted is checked
again once it is tracked.
- The identity source comes from how the request authenticated, and a
rotated secret revokes the requests signed with the old one.
- An aborted HTTP/2 request also has its body closed.
- Browser form uploads, which their handler authorizes, are not tracked.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* s3: track SigV2 requests that carry a session token
SigV2 never reads a session token, so a configured key that sent one was
classified as a session and skipped the re-checks. Only SigV4 resolves a
token, and it marks one it tolerated for a configured key ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: let the admission-race test pass only through the generation check
The re-check that the change schedules could run after the request was
tracked and abort it, so the test passed without the generation check.
Wait for that pass to take its snapshot before the request starts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: drop the executable bit from the revocation test file
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: bump the re-check generation before its scope can be taken
scheduleRevalidation released t.mu before bumping the generation. A
pass already kicked could take the new scope in between, before a
request was tracked, and that request then saw the old generation and
was never checked again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: judge a re-checked request as of when it was admitted
A re-check evaluated aws:CurrentTime and a key's expiration at the time of
the pass, so an unrelated change aborted a transfer whose time-bounded
grant expired after it started. The re-check's copy of the request now
carries its admission time, which RequestConditionValues uses for
aws:CurrentTime and aws:RequestTime, and a key's expiration is compared
with it too.
A test covers a revoked HTTP/2 upload: closing its body releases the
blocked read, and a download on another stream of the same connection
runs to its end.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* stats: let http.ResponseController reach the writer under StatusRecorder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: reset a revoked HTTP/2 request's stream
A deadline in the past resets only that stream, so a download blocked
writing to a client that stopped reading is released too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: keep in-flight requests when their key's secret is rotated
A new secret for the same access key is a rotation, not a revocation.
Removing or deactivating the key, or losing the grant, still aborts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: always abort in-flight requests whose access is revoked
Drop -s3.abortRevokedRequests: the gateway tracks the requests it admits
and re-checks them on every change that can revoke access, so a revoked
client's transfers stop without a restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* s3: a catch-up re-check does not advance the revocation generation
A request tracked after an access change scheduled its bucket's re-check
through the same path as the change, which advanced the generation again.
A request that began authenticating before that advance then scheduled
another bucket-wide re-check, so overlapping admissions could keep the
re-check loop busy, holding reloadMu, with no access change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The stores-complete assignment set the awaited count to zero before the
frontend opened, so a probe in between answered not ready without the
awaiting epoch: the shape the master reassigned. The line now stays
"starting" from its wait until its frontend has opened on it (seen by a
probe answer or a heartbeat); a later not-ready answer is a real one. The
epoch, the counts and that start are one value under one lock, so a probe
never pairs a new epoch with an old count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reachable RF3 sync_quorum primary's move is a planned move again and
stays refused for want of a seal; only the operator's failover of an
unreachable primary is decided on the fencing round. Adds the test where
the operator's failover and the master's promotion loop decide the same
volume at once: both fence at the same next epoch, one line is published.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The promotion gate excused a new volume's not-ready primary from the
master's own reading of the creation wait, which a master restart forgets
and which ends a moment before the primary opens its frontend. The fact's
owner now reports it: the probe answer carries the epoch of the primary's
assignment that still awaits replica stores, and the gate excuses a
not-ready primary only on that answer for the current line and while its
own fresh slot is acceptable. The master-side wait check is deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An operator failover whose primary has no fresh, reachable heartbeat (a
lost host) is no planned move from a live primary: it is now decided on
the fencing round for RF2 as for RF3 (one path, basis Fenced). A failover
from a reachable RF2 primary stays planned; best_effort stays refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A planned move of an RF3 sync_quorum volume needs a seal (its target is
not in every acknowledgement set), so the operator's failover was refused
and a volume whose primary host is lost could not be moved at all. The
fencing round is that seal: the failover now fences every other replica at
the line's next epoch and publishes only on the round's decision (enough
fenced survivors; the target holds the highest fenced end and is ready),
with basis Fenced. A refused round leaves the fence pending so a returning
primary is continued at e+1. RF2 and sync_all stay planned moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harness printed only the last 16 KB of each daemon's log, so a
decision made at bring-up was cut off. With SWBLOCK_TEST_LOG_DIR set (the
layout gate sets it per entry to an evidence folder it collects), a
failed test also writes each daemon's whole log there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: a second busy refusal lost the kick and fell back to the hourly
interval, so a snapshot session longer than the 30 s retry defeated it.
The kick now stays pending until a pass the volume does not refuse as
busy; every busy retry comes after the short delay. KickMaintenance
reports only a running loop (not a stopped one, nor one that ended on a
fence or lineage change).
Tests: busy -> busy -> success, then back on the interval; kicks during a
held pass coalesce into exactly one follow-up; the running-loop check;
the cut-cancels-cleaning regression bounds every wait and cancels and
joins its cleaning on failure.
Protocol contract (M8 timing change): MaintenanceOwner.tla gains the
kick, the session that makes a pass busy, and NoLostKick, with a negative
config (lost_kick: a busy pass drops the kick) that violates it; the four
existing configs keep their results. The design diagram gains the kick
and busy-retry edges; the ledger gains INV-MAINT-KICK-001 and
INV-MAINT-KICK-RETRY-001; the spec README records the run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner decision: automatic cleaning is on in v1. The holder's maintenance
pass already cleans through its own layout remote (holder-only, one
entry, refused while a snapshot session is open, the two-step conditional
removal, a cut or stop cancels it with bounded waits); it was behind
--chunk-maintenance-gc, off by default.
- --chunk-maintenance-gc defaults to true; =false is the one switch that
turns the cleaning off. The pass still runs every
--chunk-maintenance-interval (default 1h; 0 disables the whole pass).
- A snapshot deleted through the holder's control route kicks the
volume's maintenance loop for one pass now (kicks coalesce; the same
bounded pass). A kicked pass refused as busy (a cut session open) is
tried again after 30 s instead of an interval later. Retention's deletes
already precede the cleaning in the same pass; a delete made offline is
cleaned by the next periodic pass.
- Docs: operator guide, standalone deployment, and the spec README line
that called automatic GC opt-in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>