From 6820fdafea7a45a1f3000ecda91d6983819140a5 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 5 Dec 2026 22:11:30 -0800 Subject: [PATCH] filer: clear the tombstone rebuild gate before closing it (#13488) A lazy read woken by the closed channel could still load the old gate pointer, which made TestRebuildRemoteDeletionTombstones_EmptyLogReleasesGate fail on Test 32-bit. Co-authored-by: Claude Opus 5.5 --- weed/filer/filer_remote_tombstone.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filer/filer_remote_tombstone.go b/weed/filer/filer_remote_tombstone.go index b07a05ff7a..28df87a50c 100644 --- a/weed/filer/filer_remote_tombstone.go +++ b/weed/filer/filer_remote_tombstone.go @@ -487,8 +487,8 @@ func (f *Filer) rebuildRemoteDeletionTombstones(ctx context.Context, mounts []ut ctx = context.WithValue(ctx, lazyFetchContextKey{}, true) startTsNs := f.remoteDeletionRebuildStartTsNs(ctx, mounts) openGate := func() { - close(done) f.remoteTombstonesDone.Store(nil) + close(done) } // Deletes made after startup are recorded through the live delete and // event paths, so replay can only be missing deletes committed before