Skip to content

Commit

Permalink
Merge pull request etcd-io#17701 from idnandre/fix-deprecated-error
Browse files Browse the repository at this point in the history
server/storage: change deprecated bolt error to new error package
  • Loading branch information
ahrtr committed Apr 4, 2024
2 parents 7b85a7b + 12fa1bb commit 24f5f06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/storage/backend/batch_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"go.uber.org/zap"

bolt "go.etcd.io/bbolt"
bolterrors "go.etcd.io/bbolt/errors"
)

type BucketID int
Expand Down Expand Up @@ -124,7 +125,7 @@ func (t *batchTx) UnsafeCreateBucket(bucket Bucket) {

func (t *batchTx) UnsafeDeleteBucket(bucket Bucket) {
err := t.tx.DeleteBucket(bucket.Name())
if err != nil && err != bolt.ErrBucketNotFound {
if err != nil && err != bolterrors.ErrBucketNotFound {
t.backend.lg.Fatal(
"failed to delete a bucket",
zap.Stringer("bucket-name", bucket),
Expand Down

0 comments on commit 24f5f06

Please sign in to comment.