Commit Graph
1038 Commits
Author SHA1 Message Date
pingqiu-cpu a6304c2101 feat(geometry): new volumes up to 1 TiB (v1.1) (#757)
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): branch updated to current main (69c5c6bd); go test (linux) and process-level tests (real binaries) passed on 69c5c6bd; spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass (Model line now also cites FormatGate.Report for core/host/master/services.go, mapped since the PR was accepted). Code review ACCEPT on e1ed5073; the 1 TiB loaded first-cut measurement on current main passed on both volume formats.
2026-12-02 18:05:50 -08:00
pingqiu-cpu 53211a2d9d ops chunk verify: --timeout is a no-progress window; add --deadline (#966)
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): go test (linux) and process-level tests (real binaries) passed on cc3a8a6c (run 46997615891); spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass. Code review ACCEPT 6161155789; model review ACCEPT 6161515202 (per-call read/trace follow-up recorded there).
2026-12-02 16:34:31 -08:00
pingqiu-cpu bc617dd5ee test(c3): observe recovery progress on the final restore (#968)
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): go test (linux) and process-level tests passed on 7ae34a7e; spec-trace-check.sh and public-text-check.sh run locally against this PR's body and diff on main af07f8be: both pass.
2026-12-02 15:41:21 -08:00
pingqiu 25d640a084 merge main into recovery progress harness 2026-12-02 13:41:55 -08:00
Ping Qiu f0719b64b4 Merge pull request #952 from seaweedfs/fix/finalize-idle-hosts
master: the format finalize blocks only on an old holder and lists the other hosts
2026-12-02 10:40:34 -08:00
pingqiuandClaude Opus 5.5 a6f01f4aff Status test: a healthy volume shows no binary_too_old; match by volume id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:01:51 -08:00
pingqiuandClaude Opus 5.5 8fe764c039 Show a holder refused by the format gate in the master's status
At format level 1 and above, each server holding a volume whose process
for it reads below the level gets a volume condition (reason
binary_too_old, with the server and its report level): its holder only
sees no assignment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:41:56 -08:00
pingqiu 2b1129eba2 fix: require recovery exit evidence and keep Close off diagnostic output 2026-12-02 09:29:45 -08:00
pingqiu ee6a8471bd fix: observe C3 recovery progress and graceful stop separately 2026-12-02 08:53:36 -08:00
pingqiuandClaude Opus 5.5 5cb92b7593 Cut the finalize down: block only on an old holder, list the other hosts
The finalize is refused only while a live report of a process holding a
volume reads below level 1. A held volume with no report, a host with no
report and an old process holding no volume are listed in the answer
(FinalizeFormatResponse.unconfirmed, and unconfirmed.<id> metadata on a
refusal) and in --json as listed; they do not block. The durable last
level and its marks are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:45:56 -08:00
pingqiuandClaude Opus 5.5 fcf6b0ec41 Merge main (#955) into the snapshot operations
The holder's maintenance now consumes a published delete intent, so a
delete behind an earlier one resumes once its intent is consumed. The
model-code trace keeps both sides' new rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:41:21 -08:00
Ping Qiu df6ba7f031 Merge pull request #955 from seaweedfs/feat/v8-delete-consumer
Resume persisted snapshot delete intents through holder maintenance
2026-12-02 08:35:34 -08:00
pingqiu 7db6a75e65 Merge main into the finalize change 2026-12-02 08:27:11 -08:00
Ping Qiu eb17287328 Merge pull request #937 from seaweedfs/feature/905-wal-pressure-hold
fix: hold WAL writes while reclaim progresses and preserve command FIFO
2026-12-02 08:24:05 -08:00
pingqiu ed1aa53d55 Merge main into the finalize change: #956's retire answers
# Conflicts:
#	cmd/sw-block/cluster_format.go
#	core/lifecycle/node_inventory.go
2026-12-02 08:01:21 -08:00
pingqiuandClaude Opus 5.5 a13f2d6fdf sw-block, master: a failed --json answer fails the command; a retire's storage failure is Internal
Review fixes. When the --json answer cannot be written, retire-host and
finalize-format exit 1 instead of 0. A retire whose record removal failed
answers Internal (the CLI's failed, exit 1), not FailedPrecondition (refused,
exit 2); the node store's test hook can fail a removal for the control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:31:45 -08:00
pingqiuandClaude Opus 5.5 7c5f89f560 sw-block: an explicit --gen 0 is refused before admission; the holder resume has its row
--gen 0 names no incarnation and is refused before any read or write,
on a version-0 and a version-1 HEAD alike; it is not the unpinned
delete. INV-SNAP-DELETE-HOLDER-RESUME-001 states and traces the
holder's resume of its own operation behind an unconsumed intent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:05:42 -08:00
pingqiuandClaude Opus 5.5 59a0ebca91 sw-block: retire-host answers 0/2/75/1 with --json; a forced move's preview carries the typed reason
retire-host follows finalize-format's contract: exit 0 retired, 2 refused,
75 the master could not be reached, 1 any other failure or usage error, and
--json prints result, reason, server, volumes and message for every outcome.
The master's HOST_HOLDS_WORK refusal names each held volume in its typed
metadata. The forced-move preview answers the typed reason the move itself
would carry (reason_code, e.g. BINARY_TOO_OLD), and force-move --dry-run
--json shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:04:38 -08:00
pingqiu 7b8aeafbd1 Return typed backpressure for the pending reclamation slot 2026-12-02 07:03:41 -08:00
pingqiu eaf456d5e0 feat(chunkstore): resume delete intents and retire abandoned list pages 2026-12-02 07:03:41 -08:00
pingqiuandClaude Opus 5.5 33041f5ec0 master: an idle host is judged by its last reported level, kept with its node record
An idle host (no placement, no lease) is judged by the level it last
reported, kept in memory and on its node record across restarts: 1 passes,
0 blocks, a host that never reported does not count. A re-registration at
start keeps the level. Hosts that hold work still need live reports per
volume. Two tests now expect the served volume's own diagnostic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:40:06 -08:00
pingqiuandClaude Opus 5.5 b7d84cbd39 snapshot delete: route on the HEAD version in the CLI and the holder
One shared predicate routes a delete by name on the HEAD's version at
either format level: on a version-0 HEAD the default call is v1.0's
name-only delete, and an explicit --request-id or --gen is refused
typed with nothing written until the volume adopts v1.1; on a version-1
HEAD it is an operation delete. The holder runs its HEAD writes at its
assigned level (DurableProvider.FormatLevel). Controls pin the holder's
version-0 route at both levels, its one resumed operation and terminal
receipt, every operation-tree write on an absent HEAD, and the
receipt behind the CLI's printed id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:25:47 -08:00
pingqiu c88b152f98 Merge remote-tracking branch 'origin/main' into feature/905-wal-pressure-hold 2026-12-02 06:14:41 -08:00
pingqiuandClaude Opus 5.5 4fe9ba2478 master: the format finalize counts only hosts that hold work or have reported
With one process per volume, a registered spare host never reports, so the
finalize could only pass after retiring every spare host. It now counts
every host that holds a placement, a lease or an assignment, and every host
that has reported a read level; an idle host with neither does not block it.
If such a host later runs an old binary, the grant gate refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:14:14 -08:00
pingqiuandClaude Opus 5.5 6102d802d9 Merge main (#945, #950) into the snapshot operations
The v1.0-HEAD decode check keeps both v1.1 fields it refuses: #950's
reserved producer list cursors and this branch's operation bindings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:11:33 -08:00
pingqiuandClaude Opus 5.5 a24440766e chunkstore: classify the snapshot delete routes' HEAD reads
The CLI's and the holder's delete routes read HEAD to choose the route,
and the shared resolver reads it for admission; each absent-HEAD
behaviour is pinned by a probe (an absent volume's delete by name, the
holder's delete with no HEAD).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:06:05 -08:00
Ping Qiu 70e99438e9 Merge pull request #950 from seaweedfs/feat/v8-producer-reserved
Reserve bounded producer list cursors in HEAD version 1
2026-12-02 06:03:41 -08:00
pingqiuandClaude Opus 5.5 e029e9edfb volume: the holder's snapshot delete routes on the HEAD version
On a version-1 HEAD the holder's control route runs an operation delete
of the incarnation the name holds now, under an id made per request (a
new request is a new intent). A run that finds the previous delete's
intent unconsumed or HEAD moved kicks the cleaning and resumes the same
operation, bounded, so no request leaves its operation stalled. The CLI
and the holder share one admission resolver. The volume tests' holder
projection carries format level 1, a new cluster's, so their v1.1
creates pass the attach-level guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:00:44 -08:00
pingqiuandClaude Opus 5.5 1f8969b809 sw-block: snapshot-delete names its incarnation and can pin it
The delete prints the incarnation it resolved (name@gen) with its
request id, and the no-wait answer carries it; --gen deletes only that
incarnation and is refused typed when the name holds another. Retries
inside one invocation keep the id and the incarnation; a new invocation
resolves the name again, and a recreated name is what it deletes. The
name-only primitive (an old client's) still refuses a v1.1 HEAD. The
snapshot operation commit passes the shared format guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:50:01 -08:00
pingqiuandClaude Opus 5.5 53befc1a78 sw-block: snapshot-delete routes on the HEAD version and the cluster level
At cluster format level 0 a delete by name of a version-0 HEAD's
snapshot is v1.0's name-only delete, chosen before any operation record
is written. On a version-1 HEAD, or at level 1, it is an operation
delete under --request-id or an id made once per invocation and printed
for resume. The level is the master's answer (--master), 0 without one
or when it cannot be read, and every HEAD write runs at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:44:00 -08:00
pingqiuandClaude Opus 5.5 8228e3943d Merge main (#939, #942) into the snapshot operations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:32:01 -08:00
pingqiuandClaude Opus 5.5 92d85c9419 Merge main (#925, #933) into the snapshot operations
Conflicts resolved to main: runTransition runs the format guard, then
the generation stamp, then checkWrite, and the receipt guard follows.
The duplicate strict decode is dropped: a version-1 HEAD with a gen-0
entry reads tolerantly and is stamped on write; the write check refuses
it. Its two tests are rewritten to those semantics. A bound snapshot's
publishing gen must equal its operation's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:30:27 -08:00
pingqiu 9a4fc847a6 Report newer pending work when list retirement is skipped 2026-12-02 05:20:35 -08:00
pingqiuandClaude Opus 5.5 70f477b34a Merge main (#939) into the format-level read
Keeps both sides: #939's finalize-format exit codes and JSON answer
beside the format-level read in sw-block cluster_format.go, and #939's
typed move refusal (text plus reason) with the move target refused only
on a known-old report (placementTooOld), whose reason is binary_too_old.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 04:40:04 -08:00
Ping Qiu f0050b0465 Merge pull request #939 from seaweedfs/feat/finalize-format-typed
sw-block: finalize-format and a refused move answer with typed fields
2026-12-02 04:36:44 -08:00
pingqiu 9b1314805c fix: hold WAL writes through reclaim progress with command FIFO 2026-12-02 04:12:10 -08:00
pingqiu 84111fd66f feat: validate declared host timeout against WAL hold cap 2026-12-02 04:12:10 -08:00
pingqiuandClaude Opus 5.5 ca588f0045 sw-block: the --json mode is read from the arguments as a whole
A flag bound to the same variable let a partial parse overwrite the mode:
--json --bogus --json=false answered in JSON and the reverse did not. The
flag is now declared for parsing and help only; the mode is the arguments'
last --json, read before parsing. Both orders are pinned, with no RPC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 03:23:34 -08:00
pingqiuandClaude Opus 5.5 3ae32cba3d blockvolume: the real holder on a new cluster reports level 1 and is granted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 03:16:37 -08:00
pingqiuandClaude Opus 5.5 2ac97a00a5 storage, master: no pass on a fresh store; old heartbeats accepted (r2.881)
A v1.1 store with no unknown chunk and no rebuilt page starts no upgrade
compare pass and holds no cut, cursor or not: a fresh volume's chunks are
absent, so a new cluster's first snapshot runs at once (the process-level
procedures were refused in_progress). A heartbeat is accepted and its read
level recorded whatever it reads; an old binary is refused at the grant.
Test fakes that stand for v1.1 hosts in other packages report reads_level 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 03:12:35 -08:00
pingqiuandClaude Opus 5.5 abf5b6a6b1 sw-block: --json holds for a bad option in any position; force-move reason controls
The JSON mode is read before flag parsing, so finalize-format and
ops workspace move answer in JSON (and send nothing) when a malformed or
unknown option comes before --json. force-move --json gets its own controls:
the typed reason from the refusal's detail, and none for a refusal whose
message only contains the reason's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 02:29:08 -08:00
pingqiuandClaude Opus 5.5 6bf0445fcd host: recovery_stalled counts every synced startup slice and pauses for the master's authority wait
The startup inactivity window renewed only on replay, scan, map and attach
work. A new store's prezero and the WAL fence wrote and synced whole
regions with no report, so on a slow disk the window could end inside one
silent step; and the chunk layer's wait for master authority, a wait the
master bounds, ran out the same window.

- storage: phases RecoveryCreate and RecoveryFence; syncedSlices runs a
  sized step 4 MiB at a time and reports a slice only after its sync;
  prezeroNewStore uses it, and recovery reports the fence's synced bytes.
- durable: create passes RecoveryProgress; AuthorityWait tells the host
  when the authority wait starts and ends; Chunk.AuthorityGap names the
  projection fields that withhold authority.
- host: recovery_timeout becomes recovery_stalled; waits are counted, the
  window pauses while any runs and restarts when the last ends, a stall
  latched before stays latched; /status RecoveryWait=awaiting_authority.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 02:23:33 -08:00
pingqiuandClaude Opus 5.5 36d797cf01 master: read-only format level, a new cluster starts at level 1
LifecycleService.FormatLevel answers the cluster's format level (a
viewer's read; sw-block cluster format-level). A master that finds no
prior authority state writes the level-1 envelope before it serves;
existing state keeps its level, so only a cluster holding v1.0 data
needs the finalize. Above level 0 a node that has not reported its read
level is refused new work typed and retryable (AWAITING_FIRST_REPORT),
and the cluster status shows it awaiting report. The master tests' fake
hosts report reads_level 1 as a v1.1 host does; the FormatGate upgrade
tests start from a store in v1.0.x's form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 02:07:57 -08:00
pingqiuandClaude Opus 5.5 e9c7a5c4da sw-block: finalize-format and a refused move answer with typed fields
A script must not parse message text. finalize-format now exits 0 for
finalized or already finalized, 2 for a refusal, 75 when the master cannot
be reached, and 1 for any other failure (a failed write of the format
record included); --json prints result, reason, hosts, format_level and
message for every outcome. The master's refusal carries each refused host
in its ErrorInfo metadata, and a failed attestation write is Internal, not
Unavailable.

A move onto a host whose binary reported a read level below the cluster's
carries the typed reason BINARY_TOO_OLD; ops workspace move and force-move
show it in --json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 01:22:52 -08:00
pingqiuandClaude Opus 5.5 2184f8049b Merge branch 'main' into fix/nvme-command-retry-delay
Conflict in core/frontend/nvme/session.go: main added the rate-limited
write-failure log before the completion status; this branch computes the
status through the session (negotiated retry delay). Both kept: the log,
then s.completionStatus(res).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 23:39:55 -08:00
Ping Qiu 7f8367c495 Merge pull request #913 from seaweedfs/feat/format-gate-master
master: cluster format level (FORMAT-GATE): finalize-format, level-0 v1.0 semantics, retire-host
2026-12-01 22:28:14 -08:00
pingqiuandClaude Opus 5.5 dccff2f073 test: F1 retries only an exact listener-bind EADDRINUSE on the attempt's own drawn address, and keeps the first attempt's log (#927 review)
P1: f1WaitAdopted took any log line containing "address already in use"
as a taken port. It now passes the attempt's four drawn addresses to
bindTakenOn, which accepts only Go's listener error ending a line,
"listen tcp <addr>: bind: address already in use", with <addr> one of
them; a different port or host, a dial, a quoted copy, text after it, udp
or the bare words are not a taken port, so the start fails as before.

P2: the retry starts as blockvolume-<key>-attempt2, so the first attempt's
log is not truncated, and startWithBindRetry returns the first attempt's
error, which the test logs (address and log path) before the retry's
answer.

Red: TestBindTakenOnOnlyThisAttemptsListener fails with the previous
substring rule; TestStartWithBindRetry checks attempt numbers and the
kept first error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:50:37 -08:00
pingqiuandClaude Opus 5.5 de43d48be4 test: a holder's harness-chosen port is drawn below the host's ephemeral range, and a start that lost its port is retried once (#927)
handoffAddress drew from [10000, 20000) whatever the host's ephemeral range;
it now cuts the range at the host's ip_local_port_range low end
(handoffRange), as the weed port pairs already do. F1's holder start
(f1Up) answers errBindTaken when the holder exits before adopting with
"address already in use"; startWithBindRetry then draws the holder's four
ports again and starts it once more (v1, whose ports the cluster spec
names, is not retried). Any other failure, or a second taken port, fails
the test as before.

Red first: TestHandoffRangeStaysBelowTheEphemeralRange (a host whose
ephemeral range starts at 15000 must get [10000, 15000)) and
TestStartWithBindRetry (a taken port, then ok: one retry with fresh
ports) fail with the previous behaviour and pass here.

Refs #927.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:42:59 -08:00
pingqiu f459e5c208 test: require an existing kernel namespace block device 2026-12-01 20:53:22 -08:00
pingqiu 73c99f5a05 test: prove owned kernel controller teardown after retry procedure 2026-12-01 20:48:22 -08:00