From dd027e1e5379019bfeffc48ff1274b5e05581ff3 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Mar 2026 15:33:36 +0800 Subject: objectstore: Refresh * Add manual Refresh for various objectstore's * RefreshPolicy option * Refreshable MRU and atomic snapshotting --- objectstore/packed/trailer_match.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'objectstore/packed/trailer_match.go') diff --git a/objectstore/packed/trailer_match.go b/objectstore/packed/trailer_match.go index 25337cd7..dc43e37d 100644 --- a/objectstore/packed/trailer_match.go +++ b/objectstore/packed/trailer_match.go @@ -5,12 +5,12 @@ import "fmt" // verifyPackMatchesIndexes checks that one opened pack's trailer hash matches // every loaded index that references the same pack name. func (store *Store) verifyPackMatchesIndexes(pack *packFile) error { - err := store.ensureCandidates() + snapshot, err := store.ensureCandidates() if err != nil { return err } - candidate, ok := store.candidateForPack(pack.name) + candidate, ok := snapshot.candidateByPack[pack.name] if !ok { return fmt.Errorf("objectstore/packed: missing index for pack %q", pack.name) } -- cgit v1.3.1-10-gc9f91