Commit Graph
3735 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 805db02a37 test(storage): census covers package-level references; the paused-cycle test cannot hang
The extent-writer census also inspects declaration initializers and keys
each site by its receiver-qualified owner, with negative controls for a
package-level method-expression alias, a package-level closure and a
same-named method on another receiver. The paused-cycle test bounds its
entry and completion waits, and releases and joins the cycle (bounded)
on any failure before the store's cleanup; under an injected failure
while the cycle is paused it ends at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:14:46 -08:00
pingqiuandClaude Opus 5.5 e839a773e1 fix(storage): check the drain hold with the snapshot; backstop at the extent writer
A flusher cycle that started before the owner armed the hold (the flusher
runs from open) could pass the entry check, pause, and then drain the
dirty map Recover filled after the hold. The hold is now checked under
store.mu with the dirty-map snapshot: Recover takes store.mu after the
hold is set, so such a cycle sees it (red locally without this: the
paused cycle advances the checkpoint 1 -> 2 before attach).

writeExtentUnlocked refuses while held and no layer is attached, so a
writer the census misses fails loudly. The census counts every reference
(calls, aliases, method expressions) per site, with negative controls.
Tests: the provider holds on create and open (walstore-chunk only); the
post-attach drain advances the checkpoint and a fetch of the chunk keeps
the now-local block. block-design.md's WAL lifecycle shows the hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:06:49 -08:00
pingqiuandClaude Opus 5.5 f4e7ff4be6 fix(storage): a chunk store drains nothing to the extent before its chunk layer attaches
After a crash, Recover replays a synced write into the dirty map; the
flusher drained it to the extent before the chunk layer attached, so the
block was not marked local and the next fetch of its absent chunk
installed the snapshot's block over the acknowledged write.

The durable provider now holds the drain on a walstore-chunk store before
Recover (HoldExtentDrainUntilChunkLayer); every flusher drain, the stop's
included, does nothing while held; the replayed write stays in the WAL
and is served from the dirty map; attach releases the hold, so the first
drain marks it local. A held store takes no BASE. Writers of the extent
are enumerated by a guard test; INV-CHUNK-LOCAL-BEFORE-FETCH-001.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:57:52 -08:00
pingqiuandClaude Opus 5.5 dc0e45f370 test(storage): a replayed write is not drained before the chunk layer attaches (red)
A synced write into an absent chunk, a crash, a reopen: the flusher
drains the replayed write to the extent before the chunk layer attaches,
so the block is not marked local and the next fetch of its chunk installs
the snapshot's block over it (reads 0x89, want 0xE9). Adds the owner's
hold call (HoldExtentDrainUntilChunkLayer, a no-op here) and the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:42:20 -08:00
Ping Qiu 97a94b6a8c Merge pull request #652 from seaweedfs/fix/automatic-holds-best-effort
master: the automatic failover path holds a best_effort volume
2026-11-26 16:09:30 -08:00
pingqiuandClaude Opus 5.5 3c46082801 fix(volume): name the ack profile refusal ahead of the backend's reason
The refusal is read once and named first, since it is also why the
durable backend refuses. invariants.md M1 Recovering -> Serving and the
Kubernetes failover diagram carry the primary's profile check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:54:56 -08:00
pingqiuandClaude Opus 5.5 f0651b7f85 test(volume): the profile refusal is named on the production status path (red)
With the durable backend wired as the status source (as blockvolume
does), status reports the backend's generic stale-primary reason, not the
profile mismatch naming both profiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:54:53 -08:00
pingqiuandClaude Opus 5.5 118f6c8fd8 fix: a primary serves only under the master's ack profile; check the fencing round
Every assignment names blockmaster's ack profile; a primary of a
replicated line whose own --replication-ack is another one is not Healthy
(its status names both), so a lost primary that cannot answer
acknowledged under the master's profile. fencedDecision also holds on
the fencing round's own ProfileMismatch, the evidence it counts.
invariants.md: the M3 promotion-candidate row, the MATCH row's fencing
round, and the new INV-PRIMARY-ACK-PROFILE-001; the Kubernetes design
no longer says best_effort is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:03:46 -08:00
pingqiuandClaude Opus 5.5 af2b7e4d22 test: a lost primary's and the fencing round's ack profile (red)
The survivors' answers cannot show the profile the lost primary
acknowledged under. Adds AssignmentFact.ack_profile (blockmaster's
profile) with tests: an assignment names the master's profile; a primary
of a replicated line in another profile (or under a master that names
none) does not serve and says why, while its own profile or an RF1 line
serves; and a fencing round answered in another profile publishes
nothing, on both gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:03:28 -08:00
pingqiuandClaude Opus 5.5 8b0da9cd67 docs(invariants): best_effort and ack profile mismatch hold the automatic path
INV-PROMOTE-FRONTIER-BEST-EFFORT-001 now states the hold (it said the
gate promoted the highest-durable candidate) and names the renamed
product-loop test; INV-PROMOTE-ACK-PROFILE-MATCH-001 is new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:52:55 -08:00
pingqiuandClaude Opus 5.5 affc3a34f6 fix(master): hold the automatic path on an ack profile mismatch
The volume answers each promotion probe with its own --replication-ack;
the probe round names every answer whose profile is missing or differs
from blockmaster's (or an unknown master profile), and both gates hold
such a volume before any fencing round (ack_profile_mismatch), as they
hold a best_effort one. One helper (automaticFailoverHold) decides both,
called before the unsupported gate reads its candidates, so a held volume
always shows why. blockmaster refuses an unknown --launcher-replication-ack.
The best_effort product-loop test now expects the hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:51:25 -08:00
pingqiuandClaude Opus 5.5 2da008f236 test(master): the automatic path holds on an ack profile mismatch (red)
The gate reads every frontier rule from blockmaster's
--launcher-replication-ack, but a volume runs its own --replication-ack.
Adds the wire field (ProbeAnswer.ack_profile) and the result fields, with
tests: both gates hold, without fencing, when an answer's profile is
missing or differs from the master's, or the master's is unknown; the
probe round names the mismatch; the volume answers its own profile;
blockmaster refuses an unknown --launcher-replication-ack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:27:15 -08:00
Ping Qiu d9c95a716a Merge pull request #642 from seaweedfs/ci/process-level-tests
ci: run the named process-level tests; a skip or a test that never ran fails
2026-11-26 11:20:49 -08:00
pingqiuandClaude Opus 5.5 3a039fa5a1 fix(master): the automatic path holds a best_effort volume
A best_effort volume promises no frontier on a survivor, so the
automatic promotion gate now holds it (blocked event
best_effort_no_automatic_failover) instead of fencing a successor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:15:21 -08:00
pingqiuandClaude Opus 5.5 1ed7309c32 test(master): the automatic path holds a best_effort volume (red)
On both gates a best_effort volume whose primary is ineligible must get no
fencing round, keep its line and show best_effort_no_automatic_failover;
the same setup under sync-quorum fails over (the control). Red: today the
best_effort volume is fenced and failed over. The probe fake gains an ack
profile; the reason constant is added for the test to name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:02:45 -08:00
pingqiuandClaude Opus 5.5 fc16b78ea3 ci: the process-level tests as a second entry of the go-test job's matrix
The repository's public-text gate refuses a pull request that adds a line
naming the team runner label, and the separate process-level job added a
second runs-on line. It now runs as the 'process' entry of the existing
job's two-entry matrix (unit | process), under that job's unchanged
runs-on line; each step is gated on matrix.suite, and the job name and
timeout are templated so the two checks keep their names ('go test
(linux)', 'process-level tests (real binaries)') and bounds (40 / 90 min).
The old two-test step stays folded into the named list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:19:55 -08:00
Ping Qiu 74a0637035 Merge pull request #644 from seaweedfs/docs/restore-target-placement-only
docs: restore targets are placement-only; forced-move old host exits 78
2026-11-26 10:15:48 -08:00
Ping Qiu f08aa2c128 Merge pull request #640 from seaweedfs/test/known-zero-current-cli
test: the process-level tests run the current CLI
2026-11-26 10:15:23 -08:00
pingqiuandClaude Opus 5.5 5b03256c03 Merge #640's branch at its newest head into ci/process-level-tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:09:42 -08:00
pingqiu 966815582d Merge main (RC ab626792) into the docs change 2026-11-26 09:07:41 -08:00
pingqiu db01d4fc28 Merge the delete-procedure fixtures (signal stop and dependent snapshots) 2026-11-26 09:07:17 -08:00
pingqiuandClaude Opus 5.5 178bc562eb Merge #640's branch (with main ab626792) into ci/process-level-tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:52:11 -08:00
pingqiu e2b2c82d1f Merge main (RC ab626792) into the test-only change 2026-11-26 08:50:18 -08:00
pingqiuandClaude Opus 5.5 84bc84e031 Merge #640's branch at its newest head into ci/process-level-tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:20:42 -08:00
pingqiuandClaude Opus 5.5 e69da157fc Merge main (the release candidate, ab626792) into ci/process-level-tests
So the process-level suite runs on the RC product tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:20:29 -08:00
pingqiuandClaude Opus 5.5 bac18bf79d Layout lookups wait until blockmaster serves
blockmaster logs "lock acquired" before it imports the cluster spec, which
creates each volume's layout on the filer, and serves only after that. A
harness that looks a volume up right after that line can find it not
serving yet (F1 with ten volumes: DeadlineExceeded waiting for the
connection). layoutID now retries an Unavailable or DeadlineExceeded
answer within 60 s; any other answer still fails at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 07:41:20 -08:00
pingqiuandClaude Opus 5.5 4d8a2d5600 Merge #640's branch at its newest head into ci/process-level-tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 07:26:02 -08:00
pingqiuandClaude Opus 5.5 e647276503 F1 load writers retry a refused command as the Linux NVMe host does
Under F1's load a write can be refused with a retryable status (namespace
not ready, Do Not Retry clear) when local admission waits past its bound;
the command is not acknowledged and the Linux host retries it. The load
writers now do the same through retryLikeHost: only a Do-Not-Retry-clear
status is retried, at most 5 times (nvme_core max_retries), and the round
fails once the retries are used up, as the host returns EIO then. A status
with Do Not Retry set, a transport error or a lost byte still fails at
once. Each round reports busy_refusals and max_consecutive_busy per volume.
F1_NVME_RETRIES=0 turns the retries off. Controls: five refusals then
success pass; six fail; retries off fails on the first refusal; Do Not
Retry set and transport errors fail at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 07:16:53 -08:00
pingqiu 4a16db58c0 docs: align the delete gate with dependent snapshots and lease expiry 2026-11-26 06:56:57 -08:00
pingqiu 4f9fc4a511 test: cover dependent snapshots in the volume delete procedure 2026-11-26 06:56:18 -08:00
pingqiu a316f86114 docs: keep a signal-stopped sealed holder down until deletion 2026-11-26 06:36:25 -08:00
pingqiu 606da5a1a7 test: delete a signal-stopped sealed volume after its lease horizon 2026-11-26 06:35:31 -08:00
pingqiu c73bedfd37 Merge remote-tracking branch 'origin/main' into test/signal-stop-horizon 2026-11-26 06:34:53 -08:00
Ping Qiu ab6267922d Merge pull request #648 from seaweedfs/fix/ack-budget
volume: the revocation ACK's bound exceeds what the master spends on it
2026-11-26 06:25:25 -08:00
pingqiuandClaude Opus 5.5 9602e2e6df Merge #640's branch at its newest head into ci/process-level-tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 06:24:59 -08:00
pingqiu de1ca8c235 test(blockvolume): control: weed port pairs never use the ephemeral range
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 496b933f482ce955a863d7aa579e6d1ea45b3d15)
2026-11-26 06:19:00 -08:00
pingqiu cb51f2ebe9 test(blockvolume): weed port pairs avoid the host's ephemeral port range
w4FreePortPair checked a pair free and weed bound it later; a pair inside
ip_local_port_range could be taken in between by any outgoing connection's
source port (seen: a filer's gRPC port 43775 inside a host's 43255-47350,
"bind: address already in use", with extra volumes adding connections).
handoffAddress already stays below that range for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a54fcdde5ea81b1d23396c45ace385038288553a)
2026-11-26 06:19:00 -08:00
Ping Qiu b93c662ec1 Merge pull request #647 from seaweedfs/fix/delete-rerun-missing-roots
chunkstore: a volume-delete re-run completes on a deleted or interrupted volume
2026-11-26 06:18:32 -08:00
pingqiuandClaude Opus 5.5 3596e30aa4 docs: a replicated cluster spec or create is refused when it cannot be decided
With the loop off, blockmaster refuses to start when its cluster spec
lists a replicated volume, and refuses to create one; a replicated volume
of another factor than --expected-slots-per-volume is refused likewise.
Only a static --topology is not checked at start. Each refusal is quoted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 06:13:06 -08:00
pingqiu 06f890dc8e Merge main (replicated cluster-spec start check) into the docs change
# Conflicts:
#	docs/design/invariants.md
2026-11-26 06:12:17 -08:00
Ping Qiu c612bf63d8 Merge pull request #645 from seaweedfs/fix/replicated-needs-product-loop
blockmaster: refuse a replicated cluster spec with the product loop off
2026-11-26 06:10:53 -08:00
pingqiuandClaude Opus 5.5 eec08968ba test(volume): the lease-deadline control sees the ACK dispatched and its deadline
The fake ACK records that it was entered with a live context and the
deadline it carried; the test requires DeadlineExceeded, that deadline at
the 1 s lease deadline (before the 5 s ACK bound and the caller's), no
held lease afterwards and no completed ACK. A pre-dispatch error and an
ACK bounded by the parent context alone each fail it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:55:50 -08:00
pingqiuandClaude Opus 5.5 80d9839b8c test(chunkstore): a root read failure on a deleting or deleted volume writes nothing
The read-failure case now runs on a deleting and on a deleted HEAD, and
also checks the fake filer's update and delete counters: the failed
re-run releases no source and deletes no object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:53:32 -08:00
pingqiuandClaude Opus 5.5 043aee6490 test(volume): the lease deadline still cuts a slow ACK; the closeout note says 6 s
A revoking lease valid for 1 s and a master answering after 3 s: the ACK
call is cancelled at the lease deadline (about 1 s), not at the 5 s ACK
bound, and nothing is reported acknowledged; an ACK bound by the parent
context alone fails it. The invariants note now names the 6 s closeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:51:22 -08:00
pingqiuandClaude Opus 5.5 a9dbdd756c test(chunkstore): a read failure of a deleting volume's root is returned, not skipped
A root whose read fails with an ordinary error (not missing, not corrupt)
on a deleting HEAD makes the re-run return that error, skip nothing and
leave HEAD unchanged; the fake filer gains a failLookup hook (test only).
Skipping every error on a deleting HEAD fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:48:57 -08:00
pingqiuandClaude Opus 5.5 c8b4754258 fix(volume): the revocation ACK's bound exceeds what the master spends on it
The holder gave its revocation ACK call 2 s and the closeout 3 s, while the
master's handler spends up to 2 s on its bounded HEAD read and then writes
the ACK and reconciles the bindings (about 0.3 s, measured), behind its
workspace lock. A slow but successful ACK could fail at the holder (exit
75), also after the master recorded it.

WorkspaceAckTimeout (5 s, about 2.7 s above the master's measured steps,
stated in its comment) bounds the ACK call, still within the lease
deadline; the post-drain closeout is that plus 1 s. Constants only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:45:37 -08:00
pingqiuandClaude Opus 5.5 a6a2d4433c fix(chunkstore): a volume delete re-run completes on a deleted or interrupted volume
BCatalog.DeleteVolume finds the volumes to release by reading every root
the volume's HEAD names (foreignOwners). A deleted HEAD still names its
roots, whose objects the first run deleted, so the documented re-run ("a
re-run on a deleted volume sweeps any object that landed late") failed
with "layout: object missing"; so did the re-run of a delete interrupted
after it began deleting objects.

layout.DeleteVolume deletes a volume's objects only after it released the
volume from every source, so on a deleting or deleted HEAD a root whose
objects are gone has nothing left to release. foreignOwners now skips
exactly that: layout.ErrMissing on a deleting or deleted HEAD. A corrupt
object, an I/O error, and a missing root of a live HEAD stay errors. The
skipped roots are returned, and volume-delete reports them
(already_deleted_roots).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:42:55 -08:00
pingqiuandClaude Opus 5.5 ecba27d299 docs: a cluster spec's replicated volumes are checked at start
INV-AUTH-ONE-REPLICATED-FACTOR-001's limits: only a static --topology file
with a mismatched volume goes unchecked at start; a cluster spec is checked
(INV-AUTH-REPLICATED-SPEC-NEEDS-LOOP-001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:36:14 -08:00
pingqiu ce8d8329f3 Merge main into the docs change 2026-11-26 05:35:56 -08:00
pingqiu f55029d4cb Merge main (with #646) into the start guard: both ledger rows kept 2026-11-26 05:32:36 -08:00