From 895a9e599899b68b5186bbb73a4dfeeeea54f58f Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sun, 22 Nov 2026 23:38:53 -0800 Subject: [PATCH] test: verify chunk data after interrupted detach handover --- .../procedure_plain_detach_crash_integration_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/seaweed-block/cmd/blockvolume/procedure_plain_detach_crash_integration_test.go b/seaweed-block/cmd/blockvolume/procedure_plain_detach_crash_integration_test.go index 7873adaf42..7c6789ffe3 100644 --- a/seaweed-block/cmd/blockvolume/procedure_plain_detach_crash_integration_test.go +++ b/seaweed-block/cmd/blockvolume/procedure_plain_detach_crash_integration_test.go @@ -11,6 +11,8 @@ import ( "syscall" "testing" "time" + + "github.com/seaweedfs/seaweed-block/core/frontend/chunkstore" ) // P12.6 / INV-WS-SEAL-REPLAY-001: a SIGKILL during plain-seal upload @@ -105,6 +107,15 @@ func TestProcedureKillDuringPlainDetachThenCompleteHandoff(t *testing.T) { t.Fatalf("clean move adopted epoch %d; want %d", got, e2) } env.requireCutCrashImage(t, "s1", 'B') + verified, _ := env.h.command(t, "ops", "chunk", "verify", "--volume", "v1", + "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath, + "--depth", "data", "--timeout", "60s", "--bytes-per-sec", "0") + var result chunkstore.VerifyResult + if err := json.Unmarshal([]byte(verified), &result); err != nil || !result.Complete || + result.Depth != chunkstore.VerifyData || len(result.Findings) != 0 || result.ChunksNotRead != 0 || + result.DistinctChunksRead == 0 { + t.Fatalf("post-move data verify incomplete or corrupt: %s: %v", verified, err) + } } // This is the real filer's public listing of immutable key bindings, not