From c1fb2111295166b2d03d3a7e91d0264b591d30c4 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 30 Nov 2026 21:30:51 -0800 Subject: [PATCH] test: the store-down test waits for a readable HEAD after the restart; verify names the master The filer front accepts at once while the real filer behind it may still be starting, so the restart is complete when HEAD reads again. The chunk verify call names --master, which a bare chunk path now needs. Co-Authored-By: Claude Opus 5.5 --- .../procedure_store_down_integration_test.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go b/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go index 80b9e6957d..4b5bf1d310 100644 --- a/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go +++ b/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go @@ -88,7 +88,7 @@ func storeDownDuringACut(t *testing.T, down string, cowBytes int64, cowWindow bo boundary.id = id boundary.dir = path.Join(env.chunkPath, layout.VolumeDir("v1", id)) cut := []string{"ops", "chunk", "cut", "--volume", "v1", "--status-addr", env.hosts["s1"].status} - verify := []string{"ops", "chunk", "verify", "--volume", "v1", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath, "--depth", "data", "--timeout", "5m"} + verify := []string{"ops", "chunk", "verify", "--master", env.h.masterAddr, "--volume", "v1", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath, "--depth", "data", "--timeout", "5m"} headGen := func() uint64 { out, _ := env.h.command(t, env.chunkShow()...) hd, err := parseLayoutHead(out) @@ -275,8 +275,15 @@ func storeDownDuringACut(t *testing.T, down string, cowBytes int64, cowWindow bo // The store comes back. env.cluster.restartProc(t, down) backAt := time.Now() - if down == "filer" { - w4WaitTCP(t, env.cluster.filerGRPC, 30*time.Second) + // The store is back when HEAD reads through it again: the filer front + // accepts at once, while the real filer behind it may still be starting. + for end := time.Now().Add(time.Minute); ; time.Sleep(time.Second) { + if _, _, rc := env.h.run(t, env.chunkShow()...); rc == 0 { + break + } + if time.Now().After(end) { + t.Fatalf("%s back: HEAD not readable within 1m of the restart", down) + } } stalled := cutWhileDown if stalled == nil {