Skip to content

Commit

Permalink
replace CreateBucket with CreateBucketIfNotExists
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Jan 15, 2024
1 parent 4bc55e5 commit 24c7229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/storage/backend/batch_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (t *batchTx) Unlock() {
}

func (t *batchTx) UnsafeCreateBucket(bucket Bucket) {
_, err := t.tx.CreateBucket(bucket.Name())
_, err := t.tx.CreateBucketIfNotExists(bucket.Name())
if err != nil && err != bolt.ErrBucketExists {
t.backend.lg.Fatal(
"failed to create a bucket",
Expand Down

0 comments on commit 24c7229

Please sign in to comment.