mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +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>
52 lines
1.7 KiB
Go
52 lines
1.7 KiB
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/seaweedfs/seaweed-block/core/frontend/durable"
|
|
)
|
|
|
|
// --durable-impl defaults to empty (auto): new volumes are walstore, and an
|
|
// existing volume opens with its on-disk format.
|
|
func TestBlockvolumeDurableImplDefaultIsAuto(t *testing.T) {
|
|
f, err := parseFlags(phase150RequiredBlockvolumeArgs())
|
|
if err != nil {
|
|
t.Fatalf("parseFlags: %v", err)
|
|
}
|
|
if f.durableImpl != "" {
|
|
t.Fatalf("durableImpl default=%q, want empty (auto)", f.durableImpl)
|
|
}
|
|
}
|
|
|
|
func TestBlockvolumeDurableImplExplicitValues(t *testing.T) {
|
|
for _, impl := range []string{"walstore"} {
|
|
args := append(phase150RequiredBlockvolumeArgs(), "--durable-root=/tmp/sw-block", "--durable-impl="+impl)
|
|
f, err := parseFlags(args)
|
|
if err != nil {
|
|
t.Fatalf("--durable-impl=%s: %v", impl, err)
|
|
}
|
|
if f.durableImpl != impl {
|
|
t.Fatalf("durableImpl=%q, want %q", f.durableImpl, impl)
|
|
}
|
|
}
|
|
args := append(phase150RequiredBlockvolumeArgs(), "--durable-impl=bogus")
|
|
if _, err := parseFlags(args); err == nil {
|
|
t.Fatal("--durable-impl=bogus accepted")
|
|
}
|
|
}
|
|
|
|
// The removed experimental engines' names are refused typed, with the advice
|
|
// an operator acts on; nothing selects them any more.
|
|
func TestBlockvolumeRefusesRemovedEngineNames(t *testing.T) {
|
|
for _, impl := range []string{"smartwal", "parallel-walstore"} {
|
|
args := append(phase150RequiredBlockvolumeArgs(), "--durable-root=/tmp/sw-block", "--durable-impl="+impl)
|
|
_, err := parseFlags(args)
|
|
var removed *durable.RemovedEngineError
|
|
if !errors.As(err, &removed) || string(removed.Engine) != impl || !strings.Contains(err.Error(), durable.RemovedEngineAdvice) {
|
|
t.Fatalf("--durable-impl=%s: err=%v, want the typed removed-engine refusal", impl, err)
|
|
}
|
|
}
|
|
}
|