forked from TrueCloudLab/frostfs-node
[#381] go.mod: Update bbolt
Adopt new `ForEachBucket` function where possible. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
7eb8fa6350
commit
ff570847a4
5 changed files with 6 additions and 12 deletions
|
@ -25,6 +25,7 @@ Changelog for FrostFS Node
|
||||||
- `neo-go` to `v0.101.1`
|
- `neo-go` to `v0.101.1`
|
||||||
- `google.golang.org/grpc` to `v1.55.0`
|
- `google.golang.org/grpc` to `v1.55.0`
|
||||||
- `paulmach/orb` to `v0.9.2`
|
- `paulmach/orb` to `v0.9.2`
|
||||||
|
- `go.etcd.io/bbolt` to `v1.3.7`
|
||||||
- `github.com/nats-io/nats.go` to `v1.25.0`
|
- `github.com/nats-io/nats.go` to `v1.25.0`
|
||||||
- `golang.org/x/sync` to `v0.2.0`
|
- `golang.org/x/sync` to `v0.2.0`
|
||||||
- `golang.org/x/term` to `v0.8.0`
|
- `golang.org/x/term` to `v0.8.0`
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -29,7 +29,7 @@ require (
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/spf13/viper v1.15.0
|
github.com/spf13/viper v1.15.0
|
||||||
github.com/stretchr/testify v1.8.3
|
github.com/stretchr/testify v1.8.3
|
||||||
go.etcd.io/bbolt v1.3.6
|
go.etcd.io/bbolt v1.3.7
|
||||||
go.opentelemetry.io/otel v1.15.1
|
go.opentelemetry.io/otel v1.15.1
|
||||||
go.opentelemetry.io/otel/trace v1.15.1
|
go.opentelemetry.io/otel/trace v1.15.1
|
||||||
go.uber.org/atomic v1.11.0
|
go.uber.org/atomic v1.11.0
|
||||||
|
|
3
go.sum
3
go.sum
|
@ -533,8 +533,9 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
||||||
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||||
github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
|
|
||||||
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
|
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
|
||||||
|
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
|
||||||
|
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||||
go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g=
|
go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g=
|
||||||
go.mongodb.org/mongo-driver v1.11.6 h1:XM7G6PjiGAO5betLF13BIa5TlLUUE3uJ/2Ox3Lz1K+o=
|
go.mongodb.org/mongo-driver v1.11.6 h1:XM7G6PjiGAO5betLF13BIa5TlLUUE3uJ/2Ox3Lz1K+o=
|
||||||
go.mongodb.org/mongo-driver v1.11.6/go.mod h1:G9TgswdsWjX4tmDA5zfs2+6AEPpYJwqblyjsfuh8oXY=
|
go.mongodb.org/mongo-driver v1.11.6/go.mod h1:G9TgswdsWjX4tmDA5zfs2+6AEPpYJwqblyjsfuh8oXY=
|
||||||
|
|
|
@ -72,12 +72,8 @@ 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 fmt.Errorf("could not parse container ID of expired bucket: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.ForEach(func(expKey, _ []byte) error {
|
return b.ForEachBucket(func(expKey []byte) error {
|
||||||
bktExpired := b.Bucket(expKey)
|
bktExpired := b.Bucket(expKey)
|
||||||
if bktExpired == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
expiresAfter, err := strconv.ParseUint(string(expKey), 10, 64)
|
expiresAfter, err := strconv.ParseUint(string(expKey), 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not parse expiration epoch: %w", err)
|
return fmt.Errorf("could not parse expiration epoch: %w", err)
|
||||||
|
|
|
@ -315,12 +315,8 @@ func selectOutsideFKBT(
|
||||||
|
|
||||||
bktExcl := tx.Bucket(name)
|
bktExcl := tx.Bucket(name)
|
||||||
if bktExcl != nil {
|
if bktExcl != nil {
|
||||||
_ = bktExcl.ForEach(func(k, _ []byte) error {
|
_ = bktExcl.ForEachBucket(func(k []byte) error {
|
||||||
exclBktLeaf := bktExcl.Bucket(k)
|
exclBktLeaf := bktExcl.Bucket(k)
|
||||||
if exclBktLeaf == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return exclBktLeaf.ForEach(func(k, _ []byte) error {
|
return exclBktLeaf.ForEach(func(k, _ []byte) error {
|
||||||
mExcl[string(k)] = struct{}{}
|
mExcl[string(k)] = struct{}{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue