Use view transaction for metadata read

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2024-11-25 22:39:03 +00:00
parent 51fbdf3fd5
commit de14049ae0

View File

@@ -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