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
|
@ -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 b.ForEach(func(expKey, _ []byte) error {
|
||||
return b.ForEachBucket(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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue