From 9d61cd13ddee2f15b256e6328a46540f2e757f8e Mon Sep 17 00:00:00 2001 From: pingqiu-cpu Date: Wed, 2 Dec 2026 22:13:24 -0800 Subject: [PATCH] storage: read the COW window entry under its lock in a held-fill test (#975) Interim merge note (spec trace workflow startup_failure since 22:45Z): test-only fix. go test (linux) and process-level tests (real binaries) passed on 274872a6; spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts: both pass. Race evidence on a Linux host: go test -race -count=50 of TestCutCOWV3_HeldFillIsCancelledByAbortAndDrained reports one data race and a concurrent map fatal on main a6304c21, and none on 274872a6. Code review ACCEPT on 274872a6. --- seaweed-block/core/storage/chunk_cut_cow_fill_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seaweed-block/core/storage/chunk_cut_cow_fill_test.go b/seaweed-block/core/storage/chunk_cut_cow_fill_test.go index 4beadda9e9..8162a59095 100644 --- a/seaweed-block/core/storage/chunk_cut_cow_fill_test.go +++ b/seaweed-block/core/storage/chunk_cut_cow_fill_test.go @@ -51,7 +51,12 @@ func TestCutCOWV3_HeldFillIsCancelledByAbortAndDrained(t *testing.T) { if w == nil { t.Fatal("missing active window") } + w.mu.Lock() // the copier adds entries under the window's lock e := w.entries[2] + w.mu.Unlock() + if e == nil { + t.Fatal("no window entry for chunk 2") + } e.mu.Lock() state := e.state e.mu.Unlock()