diff --git a/CHANGELOG.md b/CHANGELOG.md index 00837c79b..55fe7ffad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,6 @@ Changelog for FrostFS Node - `neo-go` to `v0.101.1` - `google.golang.org/grpc` to `v1.55.0` - `paulmach/orb` to `v0.9.2` -- `go.etcd.io/bbolt` to `v1.3.7` - `github.com/nats-io/nats.go` to `v1.25.0` - `golang.org/x/sync` to `v0.2.0` - `golang.org/x/term` to `v0.8.0` diff --git a/go.mod b/go.mod index 46639d49c..71d1abd4d 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 - go.etcd.io/bbolt v1.3.7 + go.etcd.io/bbolt v1.3.6 go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 diff --git a/go.sum b/go.sum index 58f1fb217..587377173 100644 Binary files a/go.sum and b/go.sum differ diff --git a/pkg/local_object_storage/metabase/iterators.go b/pkg/local_object_storage/metabase/iterators.go index a1e21ef25..0c31c056a 100644 --- a/pkg/local_object_storage/metabase/iterators.go +++ b/pkg/local_object_storage/metabase/iterators.go @@ -94,8 +94,12 @@ func (db *DB) iterateExpired(tx *bbolt.Tx, epoch uint64, h ExpiredObjectHandler) return fmt.Errorf("could not parse container ID of expired bucket: %w", err) } - return b.ForEachBucket(func(expKey []byte) error { + return b.ForEach(func(expKey, _ []byte) error { bktExpired := b.Bucket(expKey) + if bktExpired == nil { + return nil + } + expiresAfter, err := strconv.ParseUint(string(expKey), 10, 64) if err != nil { return fmt.Errorf("could not parse expiration epoch: %w", err) diff --git a/pkg/local_object_storage/metabase/select.go b/pkg/local_object_storage/metabase/select.go index 8b086a89f..08a807481 100644 --- a/pkg/local_object_storage/metabase/select.go +++ b/pkg/local_object_storage/metabase/select.go @@ -326,8 +326,12 @@ func selectOutsideFKBT( bktExcl := tx.Bucket(name) if bktExcl != nil { - _ = bktExcl.ForEachBucket(func(k []byte) error { + _ = bktExcl.ForEach(func(k, _ []byte) error { exclBktLeaf := bktExcl.Bucket(k) + if exclBktLeaf == nil { + return nil + } + return exclBktLeaf.ForEach(func(k, _ []byte) error { mExcl[string(k)] = struct{}{}