Skip to content

Commit

Permalink
Use view transaction for metadata read
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Goff <[email protected]>
(cherry picked from commit de14049)
Signed-off-by: Brian Goff <[email protected]>
  • Loading branch information
cpuguy83 committed Nov 26, 2024
1 parent a3d7342 commit 39f7c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39f7c0b

Please sign in to comment.