mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
- 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>
85 lines
2.5 KiB
Go
85 lines
2.5 KiB
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func phase150RequiredBlockvolumeArgs() []string {
|
|
return []string{
|
|
"--master=127.0.0.1:9333",
|
|
"--server-id=m02",
|
|
"--volume-id=v1",
|
|
"--replica-id=r1",
|
|
"--data-addr=127.0.0.1:19101",
|
|
"--ctrl-addr=127.0.0.1:19102",
|
|
}
|
|
}
|
|
|
|
func TestPhase150_BlockvolumeDurableWALMultiBlockFlagDefaultFalse(t *testing.T) {
|
|
f, err := parseFlags(phase150RequiredBlockvolumeArgs())
|
|
if err != nil {
|
|
t.Fatalf("parseFlags: %v", err)
|
|
}
|
|
if f.durableWALMultiBlockRecords {
|
|
t.Fatal("durableWALMultiBlockRecords default=true, want false")
|
|
}
|
|
}
|
|
|
|
func TestPhase150_BlockvolumeDurableWALMultiBlockFlagRequiresWalstore(t *testing.T) {
|
|
args := append(phase150RequiredBlockvolumeArgs(),
|
|
"--durable-root=/tmp/sw-block",
|
|
"--durable-wal-multiblock-records",
|
|
)
|
|
if _, err := parseFlags(args); err == nil || !strings.Contains(err.Error(), "requires --durable-impl=walstore") {
|
|
t.Fatalf("parseFlags: err=%v; want the walstore requirement error", err)
|
|
}
|
|
}
|
|
|
|
func TestPhase150_BlockvolumeDurableWALMultiBlockFlagParsesOptIn(t *testing.T) {
|
|
args := append(phase150RequiredBlockvolumeArgs(),
|
|
"--durable-root=/tmp/sw-block",
|
|
"--durable-impl=walstore",
|
|
"--durable-wal-multiblock-records",
|
|
)
|
|
f, err := parseFlags(args)
|
|
if err != nil {
|
|
t.Fatalf("parseFlags: %v", err)
|
|
}
|
|
if !f.durableWALMultiBlockRecords {
|
|
t.Fatal("durableWALMultiBlockRecords=false, want true")
|
|
}
|
|
}
|
|
|
|
func TestPhase152_BlockvolumeDurableWALRecoveryTestDisableFlusherFlag(t *testing.T) {
|
|
args := append(phase150RequiredBlockvolumeArgs(),
|
|
"--durable-root=/tmp/sw-block",
|
|
"--durable-impl=walstore",
|
|
"--durable-wal-recovery-test-disable-flusher",
|
|
)
|
|
f, err := parseFlags(args)
|
|
if err != nil {
|
|
t.Fatalf("parseFlags: %v", err)
|
|
}
|
|
if !f.durableWALRecoveryTestDisableFlusher {
|
|
t.Fatal("durableWALRecoveryTestDisableFlusher=false, want true")
|
|
}
|
|
}
|
|
|
|
func TestPhase152_BlockvolumeDurableWALRecoveryTestDisableFlusherRequiresWalstore(t *testing.T) {
|
|
args := append(phase150RequiredBlockvolumeArgs(),
|
|
"--durable-root=/tmp/sw-block",
|
|
"--durable-wal-recovery-test-disable-flusher",
|
|
)
|
|
if _, err := parseFlags(args); err == nil || !strings.Contains(err.Error(), "requires --durable-impl=walstore") {
|
|
t.Fatalf("parseFlags: err=%v; want the walstore requirement error", err)
|
|
}
|
|
}
|
|
|
|
func TestPhase167_BlockvolumeRejectsUnknownDurableImpl(t *testing.T) {
|
|
args := append(phase150RequiredBlockvolumeArgs(), "--durable-impl=parallel-looking")
|
|
if _, err := parseFlags(args); err == nil {
|
|
t.Fatal("parseFlags succeeded; want unknown durable impl rejected")
|
|
}
|
|
}
|