From d8233a99e4c472353d01e576d63d43fc9ca6dd1c Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 23 Nov 2026 11:25:01 -0800 Subject: [PATCH] test(blockvolume): F1 load writer renews its NVMe/TCP deadline per command dialNVMe sets one deadline 60 s after the dial; the F1 writer runs for F1_WRITE_SECONDS (120 by default), so the connection timed out after about 4096 writes, just as the snapshots began. Each write now gets its own 30 s deadline. Co-Authored-By: Claude Opus 5.5 --- .../cmd/blockvolume/snapshot_ladder_f1_integration_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/seaweed-block/cmd/blockvolume/snapshot_ladder_f1_integration_test.go b/seaweed-block/cmd/blockvolume/snapshot_ladder_f1_integration_test.go index 986314f6d8..b97303f281 100644 --- a/seaweed-block/cmd/blockvolume/snapshot_ladder_f1_integration_test.go +++ b/seaweed-block/cmd/blockvolume/snapshot_ladder_f1_integration_test.go @@ -264,6 +264,10 @@ func f1Restore(t *testing.T, env *handoffEnv, src, snap, target string) *daemon return d } +// f1CommandDeadline bounds one load write (and its flush): a write held +// longer than this by a cut fails the rung. +const f1CommandDeadline = 30 * time.Second + // f1Block is one deterministic 4096-byte block (pattern needs a length that // divides 4096; these labels do not, so the block is filled explicitly). func f1Block(vol string, round int, kind string, lba uint64) []byte { @@ -328,6 +332,9 @@ func f1RunRound(t *testing.T, env *handoffEnv, cfg f1Config, vols []f1Volume, ro } lba := first + uint64(n) s := time.Now() + // Per command: dialNVMe's deadline is 60 s from the dial, + // shorter than the write period. + _ = c.io.SetDeadline(s.Add(f1CommandDeadline)) err := c.tryWrite(lba, f1Block(vol, round, "load", lba)) if err == nil && n%16 == 15 { err = c.tryFlush()