From 2ba005c464787eb9da2fd5f19564ee43ab739de2 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Thu, 26 Nov 2026 04:25:14 -0800 Subject: [PATCH] hydrate reads a block of each chunk the guest has not written A read fetches its chunk only when the block read is not local; the helper read each chunk's first block, which the ladder images write, so a chunk whose first block the guest wrote was never filled (two chunks of C3-kill stayed absent). It now reads each chunk's last block, which no ladder image writes. Co-Authored-By: Claude Opus 5.5 --- .../cmd/blockvolume/snapshot_ladder_integration_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go b/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go index 268179f861..37eae406bf 100644 --- a/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go +++ b/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go @@ -508,7 +508,11 @@ func (env *handoffEnv) hydrate(t *testing.T, target string) { t.Helper() b := env.hosts["n-"+target] c := dialNVMe(t, b.nvme, plannedHandoffNQN) - for lba := uint64(0); lba <= ladderLastBlock; lba += ladderChunkBlocks { + // A read fetches its chunk only when the block read is not local: a + // block the guest wrote is served locally and fills nothing. So read + // each chunk's last block, which no ladder image writes (ladderImage + // writes offsets 0, 37, 74, ... in a chunk). + for lba := uint64(ladderChunkBlocks - 1); lba <= ladderLastBlock; lba += ladderChunkBlocks { _ = c.io.SetDeadline(time.Now().Add(60 * time.Second)) c.read(t, lba, 4096) }