Skip to content

Commit de14049

Browse files
committed
Use view transaction for metadata read
Signed-off-by: Brian Goff <[email protected]>
1 parent 51fbdf3 commit de14049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache/metadata/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func (s *Store) Get(id string) (*StorageItem, bool) {
193193
}
194194

195195
var si *StorageItem
196-
if err := s.db.Update(func(tx *bolt.Tx) error {
196+
if err := s.db.View(func(tx *bolt.Tx) error {
197197
b := tx.Bucket([]byte(mainBucket))
198198
if b == nil {
199199
return nil

0 commit comments

Comments
 (0)