Files
seaweedfs/seaweed-block/core/replication/component/doc.go
T
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

52 lines
2.2 KiB
Go

// Package component provides a reusable cluster-style harness for
// authoring V3 replication scenario tests. Sits between unit tests
// (engine/transport-only, in-process types) and L3 m01 hardware
// runs (real binaries over real network).
//
// What it gives you:
//
// - A Cluster type that owns one Primary + N Replicas wired over
// real localhost TCP using the actual production code paths
// (BlockStore + ReplicaListener + BlockExecutor).
// - A substrate matrix runner — every scenario runs against
// walstore, the one durable engine, gating.
// - Network fault primitives: KillReplicaConnection / SeverTransport /
// RestoreTransport — for catch-up + degraded scenarios that L1
// unit tests can't reach.
// - Convergence + mode-label assertion helpers — the standard
// "did the replica catch up byte-exact + did the recovery_mode
// label surface" checks every T4c scenario needs.
// - Log capture so scenarios can assert on observability surfaces
// (recovery_mode label, failure reasons, etc.) without parsing
// stderr.
//
// Authoring shape (target: ~20-30 lines per scenario):
//
// func TestT4c_MyScenario(t *testing.T) {
// component.RunMatrix(t, func(t *testing.T, c *component.Cluster) {
// c.WithReplicas(1).Start()
// c.PrimaryWriteN(20)
// c.PrimarySync()
// c.CatchUpReplica(0)
// c.AssertReplicaConverged(0)
// c.AssertSawRecoveryMode(0, component.ExpectAnyMode)
// })
// }
//
// What it does NOT do:
//
// - Spin up subprocess binaries (cmd/sparrow). For full-binary
// subprocess testing, write a wrapper around os/exec; the
// component framework's API can be retargeted by swapping the
// Cluster impl.
// - Drive engine→adapter→executor recovery flows. Today
// ReplicationVolume bypasses the adapter; component scenarios
// drive catch-up directly via executor.StartCatchUp until the
// engine→adapter→executor wiring lands (forward-carry to T4d).
//
// Substrate matrix: walstore is the gating row; there is no
// "non-gating" demote; if walstore regresses, the test fails
// honestly. See `core/replication/l2_integration_test.go` for the
// QA round on this discipline.
package component