Commit Graph
3618 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 c10d64e71d docs: replicated volumes: one factor per cluster, and when they fail over
--expected-slots-per-volume is one number for the cluster: one replicated
volume with another slot count stops assignment for all of them. Single-
replica volumes can share a --cluster-spec cluster with 3-replica ones;
2- and 3-replica volumes cannot share one; a static --topology holds one
factor. A replicated volume fails over by itself only under --cluster-spec
with the lifecycle loop on; on a static --topology the operator runs
sw-block ops failover and reruns it after a refused fencing round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 04:05:58 -08:00
pingqiuandClaude Opus 5.5 e80f046ba1 docs: a replicated volume needs blockmaster's lifecycle loop
With replication_factor above 1 under --cluster-spec, blockmaster assigns
the primary through its lifecycle loop, which runs only with
--lifecycle-product-loop-interval (100ms, as the shipped chart sets); the
default 0 leaves such a volume without a primary. The single-replica starts
need no loop. The operator guide names the tests that run the replicated
start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 03:50:35 -08:00
pingqiuandClaude Opus 5.5 0d47002a04 docs: fill progress is written at the restore target's next checkpoint
A kill before then leaves the chunks it made local absent again; they are
fetched again from the source's snapshot, with no data lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 03:28:53 -08:00
pingqiuandClaude Opus 5.5 4a2d21acc5 docs: the v1 limit on deleting a never-started line
INV-WS-DELETE-NO-LIVE-HOLDER-001 notes that in this release a never-started
line that holds a lease is deleted once its lease horizon passed; the
immediate delete is a later fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 03:20:50 -08:00
pingqiuandClaude Opus 5.5 824e6f9211 docs: deleting a volume that never served waits for its lease horizon
Step 4 is refused with "live until <time>" while the lease its first start
was granted could still be live; the same command run after that time
completes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 02:53:28 -08:00
pingqiuandClaude Opus 5.5 87f121675e docs: what the CLI prints for a restore from a restore target's snapshot
The restore exits 1 with not_admitted and a message naming another
volume's chunks (not restore_source_not_own), and the refused request
leaves the target name bound to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:56:48 -08:00
pingqiu 8d5ee1f225 Merge main (RC product) into the docs change 2026-11-26 00:52:03 -08:00
Ping Qiu db064e0906 Merge pull request #637 from seaweedfs/fix/creation-phase-first
fix(master): creation is its own phase: no replacement decision before a volume's first line is healthy
2026-11-26 00:50:44 -08:00
pingqiu 61f2bd8fe9 Merge the restore output contract docs
# Conflicts:
#	docs/volume-lifecycle.md
2026-11-26 00:47:46 -08:00
pingqiu 9e32722bb4 docs: distinguish restore volume names from store directory results 2026-11-26 00:45:49 -08:00
pingqiu 0af8deaa86 Merge the operator HEAD view docs 2026-11-26 00:45:11 -08:00
pingqiu f3ce4a511f docs: state the operator HEAD view contract
The former operator examples named the retired storage HEAD fields remoteLSN and detachedBy and called live state active. Document the current ops chunk show wrapper and exported layout.Head field spelling: Position, ClaimID, empty live State, detached State and Current. The detached HEAD is the stop image; generation is record readout. This supplies the operator contract for the procedure HEAD-view fixture migration. No product behavior changes.
2026-11-26 00:41:57 -08:00
pingqiuandClaude Opus 5.5 1995f39f1d docs: the snapshot list's answer, and snapshot-delete's
ops chunk snapshots answers a JSON array of {name, root[, dependents]} in
name order; an entry has no state or cut position. snapshot-delete answers
{"volume":"<name>-<id8>","name":...,"state":"absent"}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:41:29 -08:00
pingqiuandClaude Opus 5.5 e4177679e1 docs: what the blockmaster restart for a restore target does to serving volumes
Adding a restore target to the cluster spec means restarting blockmaster.
Serving volumes ride through a restart answered within 10 s; a longer one
is fail-closed (fence at lease end, exit 75, serve again after the barrier,
at least 50 s after the restart), each with the test that shows it. The
start-wait text no longer describes a start that ends before the barrier,
and the operator guide's host-loss step says the returning old host exits
78 and is not restarted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:35:07 -08:00
Ping Qiu f538171940 Merge pull request #639 from seaweedfs/fix/delete-never-created
fix: a volume that never completed creation is deleted without its holder
2026-11-26 00:30:49 -08:00
pingqiuandClaude Opus 5.5 72fc5ae349 docs: restore targets are placement-only; old host after a forced move exits 78
A restore target is listed in the cluster spec with its placement and no
size_bytes, so the restore creates its record with the snapshot's
geometry; an entry with size_bytes creates an ordinary volume and the
restore into it is refused with target_exists. The old host after a forced
move exits 78 (reason=moved) and is not restarted. The started-too-early
gate row is removed (a start now waits through the barrier), and the
headroom test name is updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:25:37 -08:00
pingqiuandClaude Opus 5.5 3f1d36f934 docs(invariants): the delete mark in the creation machine; its ledger row in Part B
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:14:50 -08:00
pingqiu 70ffb2e2f9 Merge the creation machine docs (#637) into the delete exit 2026-11-26 00:14:39 -08:00
pingqiuandClaude Opus 5.5 8d5d262b15 docs(invariants): the creation phase's machine in Part A, with its diagram
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:14:25 -08:00
pingqiuandClaude Opus 5.5 e7f238c4a8 fix(master): a store record rewrite keeps the delete mark; writer census
record() rebuilt a volume's store record from a new attestation and
carried Initial and AwaitingFirstReady over but not DeleteWithoutAck, so
a late attestation of the last store erased the mark and ended the frozen
wait. The mark is now carried like the other one-way fields and compared
in sameAttestation. TestTheDeleteMarkFreezesTheStoreWait (an attestation
of every store after the mark, then a restart) is the red control.

A source census pins the rules: a record is built only in open and in
record, record carries the mark over, and only markDeleteWithoutAck
writes it (true); its controls break each rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:14:14 -08:00
pingqiuandClaude Opus 5.5 6fa6f56089 fix(master): the delete without ack only in stage 1, and its mark freezes the wait
The delete without the holder's acknowledgement was admitted whenever the
end of creation was not recorded. That includes a volume that is serving
acknowledged writes whose end the master could not read (after a master
restart or a partition): the reservation stopped its grants, the proof
then found a write and refused, and the volume could neither serve, fail
over nor be deleted.

It is now admitted only in stage 1, while the master's record still
awaits a replica store (the primary serves nothing until every store is
recorded). The mark is written durably first, in the lock that ends the
wait, and freezes the record in stage 1: stores attested after it never
end the wait, so the primary never starts serving. Past stage 1 the
live-lease refusal stays; a broken creating primary's lease ends by
itself and the ordinary delete then applies. The survivor proof at the
HEAD update is no longer needed and is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:10:17 -08:00
pingqiu 98c033d77c Merge the reopen fixture (#637) into the delete exit 2026-11-26 00:06:16 -08:00
pingqiuandClaude Opus 5.5 d9a2783577 test(nvmerdma): the reopen test's primary attests its stores through the heartbeat RPC
The test's volume host has no replication slot, so it never attests
stores and the volume stayed in its creation phase. The fixture now sends
r1's heartbeat with its store attestation through the master's own
ReportHeartbeat RPC, as a replicated primary does after its peers'
barriers: no test hook, no hand-written record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:06:13 -08:00
pingqiuandClaude Opus 5.5 d6aa32ce58 fix(master): a delete without the holder's ack finishes only on proof the volume is empty
The never-created delete was admitted for any creation-hold reason,
including a volume whose primary had acknowledged writes before the
master recorded anything. Now:

- it is admitted only while creation has not ended, and the master's
  record is marked durably first, in the lock that ends creation, so
  creation never ends after the admission (the delete reads the record as
  it was admitted, also after a restart);
- deleting HEAD waits out the holder's lease horizon as before, and then
  requires proof that the volume is empty, read after the horizon: stage 1
  (not every store attested: the primary served nothing), or N-K+1
  survivors that answered on valid tables at end 0. A survivor holding a
  write, a silent survivor or an unknown ack profile refuses;
- a volume whose creation ended keeps the live-lease refusal.

Part A (M2) and the ledger row INV-WS-DELETE-WITHOUT-ACK-001 name the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:03:35 -08:00
pingqiu 6ab7a1218a Merge the creation predicate (#637) into the delete exit 2026-11-26 00:02:32 -08:00
pingqiuandClaude Opus 5.5 e8c55183c9 test(blockvolume): a volume that served before its first gate tick fails over
Through the production binaries: an RF3 sync-quorum primary serves and
acknowledges a write after its stores are attested and is killed before
the next product tick (30 s loop); the survivors' write ends creation, the
gate fails the volume over and the write reads back on the new primary.
The test checks that the window really occurred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:01:51 -08:00
pingqiuandClaude Opus 5.5 12c1e55e63 fix(master): creation ends at the first ready answer or a survivor's write
A volume's creation phase ended only at the primary's first ready answer,
read by a gate tick. A primary that served right after its stores were
attested and died before the next tick left a volume that had acknowledged
writes held as creating for good: no gate, no operator failover.

Creation now ends, durably and for good, at the first of:
- the line's primary answering ready, or
- a survivor answering DurableLSN > 0 at the current line (its epoch-table
  row at the current epoch, or none): under the quorum ack every
  acknowledged write is on a survivor.

A failed write of the end of the store wait keeps the volume held (it is
reported as one store awaited) instead of releasing it with no record of
its next stage.

Tests: the gap through the operator's failover, the first-of rule and its
one-way record across a restart, the failed stage write under both gates,
the operator's move and a restart, and the primary's awaiting answer alone
holding an established volume on both gates and the fenced operator path
(each red with its guard removed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:01:51 -08:00
Ping Qiu 11a1af3e05 Merge pull request #641 from seaweedfs/docs/current-restore
docs: restore as v1 ships it; fork removed
2026-11-25 23:54:38 -08:00
pingqiuandClaude Opus 5.5 1c7d619ded docs: an older blockmaster copy can reuse epochs; no promised refusal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:46:15 -08:00
pingqiuandClaude Opus 5.5 004fd30d35 docs: restored-volume snapshots, release, and three operator rules
A restored volume takes no scheduled snapshot until its device has been
read once; a manual one names the source's chunks and cannot be
restored. ops chunk release is a repair step. The lifecycle rules name
one blockmaster per cluster, no restore of its directory from an older
copy, and that a deleted volume's name cannot be created again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:43:57 -08:00
pingqiuandClaude Opus 5.5 3bc43a6879 docs: restore as v1 ships it; fork removed
Restore is created with --master and fills on access (no restore driver,
no background copy); its source snapshot stays a dependent for the
target's life. Fork and template retirement are not in this release.
The documented show, snapshots and snapshot-delete commands get the
required --master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:53 -08:00
pingqiu 1a6c4b13e4 Merge the creation phase (#637, with main) into the delete exit 2026-11-25 22:13:07 -08:00
pingqiu 28f0964b61 Merge main (with #629) into the creation phase 2026-11-25 22:13:07 -08:00
Ping Qiu c83b5ffc62 Merge pull request #629 from seaweedfs/feat/standalone-failover-cli
feat(sw-block): ops failover for standalone; the alpha stack deploys the manual failover
2026-11-25 22:12:26 -08:00
pingqiuandClaude Opus 5.5 cbd0f12d0c test(master): the endpoint fixture is an established volume
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 22:07:41 -08:00
pingqiu c84cb4216e Merge #629 (standalone failover) into the creation phase
# Conflicts:
#	core/host/master/failback_runtime_test.go
#	core/host/master/planned_move.go
2026-11-25 22:02:11 -08:00
pingqiu 1822110220 Merge main into feat/standalone-failover-cli
# Conflicts:
#	cmd/sw-block/main.go
#	core/authority/directive.go
2026-11-25 21:52:39 -08:00
pingqiuandClaude Opus 5.5 2e2a425eca fix(master): the delete reads the creation phase with the volume's line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:47:00 -08:00
pingqiuandClaude Opus 5.5 3615b1d7e8 test(master): the never-created delete finishes past the lease horizon
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:46:59 -08:00
pingqiuandClaude Opus 5.5 f5641b362f test: the reservation guard lives in reserveWorkspaceDeletion; the live-lease delete fixture is an established volume
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:46:59 -08:00
pingqiuandClaude Opus 5.5 353163e23c fix: a volume that never completed creation is deleted without its holder
The layout delete's reservation was refused while any lease was live, and
a creating primary that is stuck (a replica store never attested) keeps
renewing, so the only exit from the creation phase, delete and recreate,
was closed. A volume whose master record never left the creation phase
(it served nothing, acknowledged nothing) is now reserved for delete under
a live lease: the reservation stops every grant at once, the delete's HEAD
update still waits until no lease is live, and HEAD deleting then admits
no claim or commit. A volume that ever completed creation keeps the
live-lease refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:46:59 -08:00
pingqiuandClaude Opus 5.5 8d2c0dafd5 test(master): a never-created volume is deleted without its holder; an established one is not (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:46:59 -08:00
pingqiuandClaude Opus 5.5 8c0a4f7123 docs: creation ends at the primary's first ready answer (INV-PROMOTE-CREATION-WAIT-001)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:45:41 -08:00
pingqiuandClaude Opus 5.5 b201bbb74d test(master): fixtures record the first ready answer where the primary served; the restart gap is still creating
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:40:26 -08:00
pingqiuandClaude Opus 5.5 5e520aa762 test(master): the boot-grace fixture is an established volume (first ready answer recorded)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:34:44 -08:00
Ping Qiu 5d58337c3f Merge pull request #638 from seaweedfs/fix/pool-read-verify
storage: typed error for a pool chunk off its HEAD ref; read-verify controls
2026-11-25 21:32:26 -08:00
pingqiuandClaude Opus 5.5 2eb5fbfcab fix(master): creation ends at the primary's first ready answer at its first line
Not at the last store attestation: a primary restarted after the last
attestation, before it adopts the complete assignment, was no longer
creating by the record and could be replaced. The record now sets
awaiting_first_ready in the same write that clears its initial set, and
clears it, durably and for good, at the line's primary's first ready
answer; until then the volume is creating. A record written before the
field existed carries none, so an established volume is never reopened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:28:41 -08:00
Ping Qiu 506c8f9b24 Merge pull request #636 from seaweedfs/fix/restarted-primary-new-endpoint-version
authority: a restarted primary is re-issued its line at a new endpoint version
2026-11-25 21:20:11 -08:00
pingqiuandClaude Opus 5.5 30c2f43579 tests: gofmt the cut test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:16:49 -08:00
pingqiuandClaude Opus 5.5 49f8c1630d tests: read-verify controls compare extent bytes; cut test tracks the child to exit
Review amendments (no product change):
- storage: both refusal controls read the chunk's blocks from the extent
  file before the refused fill and after it, and require them unchanged;
  a fill that installs damaged bytes and then refuses is now red (it left
  absent and localBlocks untouched, so the old assertions passed).
- chunkstore cut test: the child's stdout is read to EOF, so an upload
  begun during the delay or the kill is counted; CUT-ERR at any point
  fails the round; the child must have died by SIGKILL; objects 0..last
  (at least the first four) are validated every round (an object never
  begun must be absent) and all of them are completed by a new session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:16:32 -08:00