From d02e170bbd806fb0cc1eeb1e0471db1719c6f404 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Thu, 14 Sep 2023 01:34:32 +0000 Subject: [PATCH] fix recover from file --- internal/db/kvs/bbolt/bbolt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/kvs/bbolt/bbolt.go b/internal/db/kvs/bbolt/bbolt.go index 78cb6c4b96..e5c9b0fb7d 100644 --- a/internal/db/kvs/bbolt/bbolt.go +++ b/internal/db/kvs/bbolt/bbolt.go @@ -53,7 +53,7 @@ func New(file, bucket string, mode fs.FileMode, opts *bolt.Options) (Bbolt, erro } if err := db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket(bk) + _, err := tx.CreateBucketIfNotExists(bk) if err != nil { return fmt.Errorf("failed to create bucket: %w", err) }