Commit Graph
1508 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 5a57e8564d hostlimit, storage: chunk fetches are capped per host
- hostlimit: Config.FetchSlots (default 64, files fetch-0..N-1 in the pool).
  HoldFetch takes a free slot without waiting, from the key's hash slot;
  with every slot held it blocks on its hash slot (the kernel queues the
  waiters) and tries the other slots every 20 ms, using whichever lock comes
  first and releasing the other; its context bounds the wait, and a lock got
  after that is released at once. lockBlocking on Unix and Windows.
- storage: BudgetFetch; fillOnce holds one slot across its remote read only
  (a read miss and a hydrate-all fill alike); a context error on the wait is
  the hydration path's pending, as before.
- blockvolume: --host-limit-fetch-slots. Invariants: INV-HOST-FETCH-CAP-001;
  M7 states it. v1.1 notes carry it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:52:37 -08:00
pingqiuandClaude Opus 5.5 970d925fce durable: a requeued turn stays at the back until a cut succeeds
requeue is set by an admitted attempt that fails and cleared only by a
success: a wait, a refusal or a dropped ticket (a reconcile, a pause) leaves
it set, so every later ticket of the turn is taken at the host's now.
INV-HOST-TICKET-REENTRY-001 states it and names the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:54:03 -08:00
pingqiuandClaude Opus 5.5 1a3ab72b7d hostlimit, durable: ticket order holds on retry and refusal
- the cut loop: an attempt admitted on its ticket that then fails retries on
  a fresh ticket at the back of the queue (the host's now), never at its
  schedule's earlier due time; a failed ticket creation is a wait (no cut,
  the reason in status, the next poll tries again), never an un-ticketed cut.
- the limiter: an urgent admission refused after taking its urgent-pending
  hold closes the hold, so no Normal admission stays refused for it.
- tests: the new concurrent tests and the ticket tests end their workers
  with a bounded join on every path, a failing assertion too.
- invariants: INV-HOST-TICKET-REENTRY-001; the urgent row names its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:54:03 -08:00
pingqiuandClaude Opus 5.5 fd6701e86b hostlimit: timer cuts wait in ticket order; pacing uses the budget over held slots
The change of this PR's 22 commits, carried onto current main as one
commit (its base was 1884 commits behind). Fitted to main:

- pacing: main's rule that fallback-only leases are not paced stays; a
  healthy lease is paced at the budget over the held normal and urgent
  slots (this PR's rule) instead of over the configured slot count.
  TestFallbackDoesNotUnpaceAHealthyLease keeps its property (a healthy
  lease beside a fallback lease is paced) with a 500 ms deadline, since a
  lone holder now gets the whole budget.
- the cut loop keeps main's attempted hook and afterStaging (a failed
  attempt that staged new chunks retries at the next poll), with the
  ticket handling; the random retry delay is gone, as this PR intends.
- imports and constants: neither side's removed ones return.
- invariants: main's new rows and this PR's new and restated rows; the
  slot-wait row is this PR's (ticket order, the next poll).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:54:03 -08:00
pingqiuandClaude Opus 5.5 27c679c36f hostlimit: exact, lock-free, monotonic hold expiry; the upgrade cure named
- expire decides and revokes in one step under the limiter's lock, reading
  the last progress at that step: a progress report that completed before it
  is always honoured.
- Progress takes no lock: it reads a lease index (sync.Map, kept with the
  live set) and stores an atomic stamp, so it never waits behind an
  admission's file-system work.
- the window runs on the monotonic clock: a stamp is time.Since of the
  limiter's base, never a wall timestamp.
- the launch refusal of a pool written with other flags names
  configuration.json and the cure (stop every process, remove it, start);
  the v1.1 notes carry the hold change and the upgrade step; the upload
  rate flag says the window must exceed one chunk's send time at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:00:50 -08:00
pingqiuandClaude Opus 5.5 4f7e211adc hostlimit, storage: a hold is a no-progress window renewed by its work
- hostlimit: Config.MaxHold (a fixed 5-minute hold limit) becomes
  NoProgress (default 60 s). Progress(id) records the work's progress, with
  no OS call; the hold's one timer, when it fires, arms again for the rest
  of the window if the work progressed, and revokes otherwise. A hold whose
  work keeps progressing is never revoked; a stalled one is revoked within
  the window.
- blockvolume: --host-limit-no-progress; --host-limit-max-hold stays as a
  deprecated alias of it.
- storage: BudgetProgress, the optional Budget that renews a hold; a cut
  attempt reports one unit of work per chunk compared, staged or uploaded.
  A hydrate-all holds one permit per chunk fill, so its hold is one fetch.
- invariants: INV-HOST-HOLD-NO-PROGRESS-001; M7 states the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:45:24 -08:00
Ping Qiu 3228a6802b Merge pull request #882 from seaweedfs/test/delete-store-evidence
test, sw-block: a stalled delete and a dead test store are named
2026-12-01 08:47:47 -08:00
pingqiuandClaude Opus 5.5 8bd9dca492 invariants: INV-CLI-DELETE-PROGRESS-001 states the stall report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 07:50:08 -08:00
pingqiuandClaude Opus 5.5 313d7b7d07 invariants: M1 shows the v1.1 upgrade's guarded clean-stop seed
The diagram gains the Recovering -> Serving edge of the v1.1 attach's
upgrade, and the table its row: whole local chunks Rebuilt all, Hash,
Commit to HP with HEAD's hash only when the clean-stop proof holds (the
claim's own HEAD a committed, idle detach; the store's lineage; the store's
synced position), unknown otherwise; linked to INV-CHUNK-RECORD-SEED-001,
whose machine column now names the same transition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 07:05:12 -08:00
pingqiuandClaude Opus 5.5 cbd442612e v1.1 upgrade: seed whole local chunks after a clean stop
- layout: LocalRoot.ReportCleanStop is told, on each attempt of the claim's
  own check, whether the HEAD the claim is built on is a committed, idle
  detach (DetachedBy) carrying this root's claim id; the committing
  attempt's report is the last. Never judged on Start's first read.
- durable: startLayoutRoot returns that clean stop; the provider carries it
  into ChunkLayerConfig.CleanStop.
- storage: upgradeChunkRecordSeeded seeds only an unmarked store whose
  layout claim id is the proof's and whose synced position (the pages'
  valid-through) is the proof's; the attached HEAD at another position is
  logged and never seeded on. A whole local chunk steps Rebuilt all, Hash,
  Commit and takes HEAD's hash (a chunk HEAD does not name: the zero
  chunk's). The upgrade's order is unchanged.
- invariants: INV-CHUNK-RECORD-SEED-001.
- tests: the attach takes the proof from its config
  (TestV11AttachSeedsFromTheCleanStopInItsConfig); startLayoutRoot reports
  it (TestStartLayoutRootReportsTheCleanStop).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 06:16:11 -08:00
pingqiuandClaude Opus 5.5 c3230efc58 log.collect: only a unit command's own failure is unproven; colliding JSON keys withhold
A unit journal read whole with no records in the window (or a command
the host does not have) is only unavailable; only the command's own
failure (cut, nonzero exit, truncated) makes the bundle unproven. Two JSON
keys that collide once sanitized are no longer told apart by a suffix,
which could itself be a known credential and cost quadratic probes: that
artifact is withheld as not proven, checked after its redaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 04:50:31 -08:00
pingqiuandClaude Opus 5.5 241f7981b1 log.collect: any declared source not read whole makes redaction unproven
A declared log file refused before discovery (not a regular file, changed,
over 4 MiB, not text, unreadable), a process whose arguments could not be
read, and a failed or truncated unit command each make the bundle
manifest-only, not only a unit cut by the time budget. A missing file or a
gone process holds nothing to discover and stays only unavailable. In an
unproven bundle every artifact error is replaced by a fixed one, and the
skipped names are printed sanitized. A known credential used as a JSON
object key is redacted too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 04:40:32 -08:00
pingqiuandClaude Opus 5.5 eefc728c41 docs: ledger row for the bundle's unproven-redaction rule
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 04:23:40 -08:00
pingqiu 8f639975d3 Merge main into bindings verifier 2026-12-01 02:05:55 -08:00
pingqiu c967152e63 docs: qualify inline and replicated needle verification 2026-12-01 01:32:59 -08:00
Ping Qiu e09cdeb2f0 Merge pull request #867 from seaweedfs/fix/volume-directory-collision
fix: recover pending volume creates from id8 directory collisions
2026-12-01 01:27:09 -08:00
pingqiu 95abcb3183 fix: verify backing needles with HEAD and retain exact chunk hashes 2026-12-01 00:42:47 -08:00
pingqiuandClaude Opus 5.5 c42dbc95a3 layout: a HEAD of a newer version is malformed to every caller, named as newer
ErrHeadNewerVersion now wraps ErrMalformed: every caller that refuses a
malformed HEAD for good refuses a newer one the same way (Start stays a
final refusal, never a retry loop), and its text says to use a newer
binary. The Start classification table pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 00:24:53 -08:00
pingqiu 697afeedf8 fix: validate owner identity before verify deduplication 2026-12-01 00:19:15 -08:00
pingqiu 950d636e93 fix: verify chunk bindings without reading their bodies 2026-12-01 00:03:07 -08:00
pingqiu da17629e75 docs: split collision invariants into single properties 2026-11-30 23:55:47 -08:00
pingqiuandClaude Opus 5.5 b84f55ba3e chunkstore: keep an unchanged touched segment in the size; ext is a canonical object
A commit by change subtracts only the touched segments its new root no
longer names: a shard whose segment came out unchanged stays in the size.
HEAD's ext must be a JSON object in its canonical bytes, on encode and
decode, so it round-trips byte for byte. The format doc states the
upgrade order (version-aware readers before any v1.1 writer) and that the
fullest-HEAD figure is a sizing check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 23:30:43 -08:00
pingqiuandClaude Opus 5.5 e4e34c26a6 chunkstore: keep the manifest size through commits; list it per snapshot
On the v1.1 format a full commit writes the sum of its root and segments
as HEAD's current_bytes and the named snapshot's manifest_bytes. A commit
by change subtracts the base root and the replaced segments and adds the
new ones, with no lookups; an unknown size stays unknown. Snapshot
listings report manifestBytes, null when unknown. The format doc states
the ext contract; a test bounds the fullest HEAD under the inline limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 23:30:43 -08:00
pingqiu 3616d42946 docs: record checked collision redraw automaton 2026-11-30 23:29:24 -08:00
pingqiu ffe16608dd fix: redraw pending volume identity after directory collision 2026-11-30 23:06:30 -08:00
Ping Qiu 13d0627043 Merge pull request #864 from seaweedfs/fix/holder-cgroup-memory
blockvolume: derive the default Go soft memory limit from its cgroup
2026-11-30 22:59:12 -08:00
Ping Qiu 786e5b7596 Merge pull request #853 from seaweedfs/feature/v11-map-checkpoint-by-change
storage: checkpoint the chunk map by changed pages
2026-11-30 22:38:55 -08:00
Ping Qiu 5a04fd27c3 Merge pull request #863 from seaweedfs/feat/remote-full
storage: a full chunk store is remote_full, and status names the last failed cut
2026-11-30 22:33:58 -08:00
Ping Qiu 6cea6fd674 Merge pull request #843 from seaweedfs/v11/remove-experimental-engines
durable: remove the smartwal and parallel-walstore engines (refused typed)
2026-11-30 21:54:58 -08:00
Ping Qiu a8ef2e4bfe Merge pull request #862 from seaweedfs/fix/coverage-initialization-append-guard
storage: recheck coverage initialization before publication
2026-11-30 21:49:41 -08:00
pingqiuandClaude Opus 5.5 0ce226d22f docs: operator guide names remote_full and LastCutFailure for a full store
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:46:01 -08:00
pingqiu 4d86b68417 Merge remote-tracking branch 'origin/main' into feat/remote-full 2026-11-30 21:45:36 -08:00
pingqiu 987ac097eb docs: clarify cgroup v2 sizing and explicit memory configuration 2026-11-30 21:44:36 -08:00
pingqiuandClaude Opus 5.5 96a3d30003 storage: keep a full store's answer through retries and a batch; record the guarantees
SeaweedFS names a full store only to the assign that tries to grow a
volume, so one object's retries and a cut's upload batch keep that answer
over plainer failures. A real-weed integration test fills a tiny store and
checks every round of concurrent uploads answers remote_full. The ledger
gains the remote_full and LastCutFailure rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:41:36 -08:00
pingqiu 60e482f978 blockvolume: derive the default Go memory limit from its cgroup 2026-11-30 21:40:44 -08:00
pingqiu 325e69038a Record native checkpoint and empty-tail stop qualification 2026-11-30 21:37:36 -08:00
pingqiu 24610b1655 Synchronize map allocator geometry across the coverage upgrade 2026-11-30 21:37:36 -08:00
pingqiu e5be3b76a3 Checkpoint changed map paths with shared references and extent pins 2026-11-30 21:37:35 -08:00
pingqiu 87c17dbb8b Freeze owned map entry snapshots without copying the live vector 2026-11-30 21:37:16 -08:00
pingqiu 984e94fc40 perf: share immutable map entry pages between candidates 2026-11-30 21:37:16 -08:00
pingqiu 9b07f4b7b5 docs: retain the existing linear empty-map creation contract 2026-11-30 21:37:16 -08:00
pingqiu 7e9700782e test: align map cost boundary with first-open upgrade 2026-11-30 21:37:16 -08:00
pingqiu 51ca6d2432 test: expose legacy store creation admission gap 2026-11-30 21:37:16 -08:00
pingqiu a8d922942b test: expose whole-map checkpoint copy at one TiB 2026-11-30 21:37:16 -08:00
pingqiuandClaude Opus 5.5 36bc8f5683 storage: a full chunk store is remote_full, and status names the last failed cut
SeaweedFS's assign answer for a store with no writable volume and no free
volume slot is classified as ErrChunkRemoteFull on both assign paths; the
routes answer it as remote_full (503, retryable after capacity is added),
apart from remote_unavailable. Every failed cut, requested or scheduled,
sets the layer's LastCutFailure (code, cause, time, repeats), cleared by a
success; the holder logs one WARN per change of code, not one per retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:29:02 -08:00
pingqiu 4b02f5a4d3 storage: recheck coverage initialization position before publication 2026-11-30 21:26:57 -08:00
pingqiuandClaude Opus 5.5 f8da58da3e docs: restore block-design 1.4-1.7, cut with the smartwal section
Replacing section 1.3 also deleted the sections after it (1.4 Durability
and Sync, 1.5 Authority, 1.6 Replication and failover) and the 1.7
heading; they describe walstore and the shipped protocols, not the removed
engines. Restored verbatim from main; only 1.3 changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:25:32 -08:00
pingqiuandClaude Opus 5.5 3303097f58 docs: SeaweedFS capacity for block volumes, and what a full store reports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:14:10 -08:00
pingqiuandClaude Opus 5.5 68045d9698 durable: remove the smartwal and parallel-walstore engines
- The provider refuses the removed names and, under every selector and
  before any selector comparison, a volume carrying their magic (SWAW;
  SWPW in either header slot), reading the file read-only and never
  modifying it. blockvolume --durable-impl and the launcher refuse the
  names with the same advice; the chart schema allows walstore only.
- core/storage/smartwal, core/storage/parallelwal and
  cmd/sw-block-testutil (whose one command corrupted smartwal records)
  are deleted, with the helm smartwal-corruption scenario and the
  parallel-walstore gate script.
- The replication harness runs on walstore; tests that ran on a removed
  engine only because a stub needed some store move to walstore, and the
  state_convergence label test moves to the in-memory BlockStore.
- sw-block cluster.check drops the removed engines' cases.
- Ledger: INV-OPEN-REMOVED-ENGINE-REFUSED-001 and
  INV-OPEN-REMOVED-ENGINE-NAME-REFUSED-001, an OpenRefused edge in M1, and
  the rows citing the removed tests updated. Docs: block-design 1.3 now
  describes the removal, the smartwal deep-dive and figure are gone, the
  scripts default to walstore, and the v1.1 notes carry the removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:38:54 -08:00
pingqiuandClaude Opus 5.5 60f20f1518 docs: ledger rows for the v1.1 chunk record (WAL-backed pages, fill holds, evict receipt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:24:55 -08:00