From 1d60144e70b734bc26f036f9559a36489115e817 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Wed, 2 Dec 2026 02:46:51 -0800 Subject: [PATCH] storage: the owned-map checkpoint retires its dirty entries once publishCheckpointV3 already sets the checkpoint and retires every dirty entry at or below it under the store lock; its owned-map caller walked the dirty map a second time for nothing. Co-Authored-By: Claude Opus 5.5 --- .../core/storage/walstore_map_checkpoint_v3.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/seaweed-block/core/storage/walstore_map_checkpoint_v3.go b/seaweed-block/core/storage/walstore_map_checkpoint_v3.go index 7311ece84e..57dc07f8c3 100644 --- a/seaweed-block/core/storage/walstore_map_checkpoint_v3.go +++ b/seaweed-block/core/storage/walstore_map_checkpoint_v3.go @@ -164,15 +164,11 @@ func (s *WALStore) persistOwnedMapCheckpointV3(highestLSN, recoveryGen uint64) e } return s.rolloverCheckpointV3Locked() } - // The extent was fsynced by the flusher. - d, err := s.publishCheckpointV3(cp, false, recoveryGen) - if err != nil { - return err - } - s.mu.Lock() - s.checkpointedV3Locked(d.CheckpointLSN) - s.mu.Unlock() - return nil + // The extent was fsynced by the flusher. The publication sets the + // checkpoint and retires the dirty entries at or below it itself + // (checkpointedV3Locked, under the store lock it holds). + _, err := s.publishCheckpointV3(cp, false, recoveryGen) + return err } // publishCheckpointV3 is the one v3 checkpoint publication (plan row 9: the