mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
85d0ca7504
commit
c1fb211129
1 file changed
+10
-3
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user