Commit Graph
3621 Commits
Author SHA1 Message Date
pingqiu a58b616fc5 Merge main (RC product) into the test-only change 2026-11-26 00:52:02 -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
pingqiuandClaude Opus 5.5 9001a62778 Headroom way-out test reads the volume-delete answer the CLI prints
volume-delete answers {"volume":"<name>-<id8>","state":"deleted"}; the
test decoded a completed field the command no longer prints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:47:20 -08:00
pingqiu 6b817ed075 Merge the restore and HEAD command result fixtures 2026-11-26 00:46:53 -08:00
pingqiu eed6b8439f Merge the procedure HEAD layout view 2026-11-26 00:44:47 -08:00
pingqiuandClaude Opus 5.5 99e3a09057 Snapshot ladders read the snapshot list the CLI prints
ops chunk snapshots prints a JSON array of {name, root, dependents} in
name order, and a listed snapshot is published; the list carries no state
or cut position. The ladders now decode that array and check identity by
name and root: three snapshots with roots of their own, s4 listed only
once published and then unchanged, a retried snapshot keeping its root.
Contents stay checked by the restores that follow. A snapshot of a restore
target that is not fully local is now taken, and a restore from it is
refused with restore_source_not_own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:44:18 -08:00
pingqiu 25b9eeaedb test: decode current restore and HEAD command results in process fixtures 2026-11-26 00:43:27 -08:00
pingqiu 1965bfd45e test: read procedure HEAD proofs from the layout view
FIXTURE: the procedure helpers decoded ops chunk show into the retired storage HEAD. The CLI emits layout.Head: live state is empty, committed position is Position, and the detached HEAD itself is the stop proof. Port each procedure HEAD reader plus the shared seal and successor checks; preserve holder, epoch, image, position and generation assertions. No product deadlines or expected exit codes change.

The real layout.Head JSON passed to the legacy decoder reproduces position zero and nil DetachedBy. Current checks and captured-output controls pass 10x; the Linux subprocess/chunkstore_integration test binary compiles. Full real-binary procedure rerun remains pending.
2026-11-26 00:40:39 -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 bea2b7e20e Head-size fixture reads the store through its layout paths
The fixture read <chunk-path>/<name>/HEAD and counted top-level segments
in it, and counted <name>/keys: names the layout no longer writes (a 404,
or a silent 0). It now resolves the store directory <name>-<id8> from
blockmaster's record, decodes HEAD, counts the segments of its current
root, and counts the volume's pool objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:17:52 -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 1131ad58b0 Restore targets in the procedure harness are placement only
startHandoffEnvWith imported each target as an ordinary volume record, so
the first restore into it was refused as target_exists (bound to another
restore request). Targets now carry placement only and their restore
creates them; startHandoffEnvVolumes keeps the old form for the tests that
start their extra volumes without a restore. Assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:14:18 -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 957970d634 Merge the handoff layout identity cache fix 2026-11-26 00:09:04 -08:00
pingqiuandClaude Opus 5.5 cbe25d20f9 test: triage of the tagged run: --master, exit 78, the cleaning pass
- ops chunk show and snapshots built as argument slices get --master;
  the guard now also checks []string{"ops", ...} literals.
- A returning old host after a forced move exits 78 with reason=moved
  (the master's typed MOVED refusal), as the product documents.
- TestProcedureStartTooEarlyExitsAndARestartServes is retired: a start
  before the barrier now waits through it and is re-granted, which
  TestProcedureStartInsideTheBarrierWaitIsReGranted covers.
- ops chunk gc is gone: D4 deletes through the holder, whose cleaning
  pass removes exactly the deleted snapshot's chunks from the pool; the
  headroom test asserts the source snapshot of a waiting restore target
  cannot be deleted and keeps its chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:09:04 -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
pingqiu d65c44d849 test: initialize the handoff layout identity cache on first resolve 2026-11-25 23:59:26 -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 1e1d1f3628 test: the killed-mid-fill test's reader is concurrent, not background
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:44:48 -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
pingqiuandClaude Opus 5.5 86b81c66a8 test: leave the operator guide to the docs change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:34:44 -08:00
pingqiuandClaude Opus 5.5 b7e1180eda test: restore targets fill on access; the guard covers run calls
v1 has no background fill: hydrate reads one block of every chunk, then
requires none absent, and the killed-mid-fill test drives its fill with
a background reader. The guard also checks the harness's run calls, and
the show and snapshot-delete calls it found get --master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:31:44 -08:00
pingqiuandClaude Opus 5.5 9d98268850 test: the CLI guard runs its calls from a temporary directory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:24:32 -08:00
pingqiuandClaude Opus 5.5 252d30ace7 test: the process-level tests run the current CLI
A guard runs every literal `sw-block ops ...` call in cmd/blockvolume's
tests through the CLI's own argument handling, so a call the CLI refuses
fails CI instead of a lab run. The calls it found are brought to the
current CLI: --master on restore and snapshot commands, the removed
restore driver and fork replaced or dropped, and the killed-mid-fill
test converted to background hydration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:22:19 -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