mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
test: verify chunk data after interrupted detach handover
This commit is contained in:
1 parent
81f602d96a
commit
895a9e5998
1 file changed
+11
@@ -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
|
||||
|
||||
Reference in new issue
Block a user