From 39f7c0b4b6a1f2843149f1df7edb642a6f674e23 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Mon, 25 Nov 2024 22:39:03 +0000 Subject: [PATCH] Use view transaction for metadata read Signed-off-by: Brian Goff (cherry picked from commit de14049ae0ba6500cde0663ea4486bf44c097f29) Signed-off-by: Brian Goff --- cache/metadata/metadata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/metadata/metadata.go b/cache/metadata/metadata.go index 47a08b69d4a0..0578f128f95a 100644 --- a/cache/metadata/metadata.go +++ b/cache/metadata/metadata.go @@ -193,7 +193,7 @@ func (s *Store) Get(id string) (*StorageItem, bool) { } var si *StorageItem - if err := s.db.Update(func(tx *bolt.Tx) error { + if err := s.db.View(func(tx *bolt.Tx) error { b := tx.Bucket([]byte(mainBucket)) if b == nil { return nil