forked from TrueCloudLab/frostfs-node
[#378] metabase: Calculate expiration once for each fake bucket
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a6d5556dc1
commit
bc5e04f502
1 changed files with 7 additions and 7 deletions
|
@ -58,14 +58,14 @@ func (db *DB) iterateExpired(tx *bbolt.Tx, epoch uint64, h ExpiredObjectHandler)
|
|||
return nil
|
||||
}
|
||||
|
||||
return bktExpired.ForEach(func(idKey, _ []byte) error {
|
||||
expiresAt, err := strconv.ParseUint(string(expKey), 10, 64)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not parse expiration epoch")
|
||||
} else if expiresAt >= epoch {
|
||||
return nil
|
||||
}
|
||||
expiresAt, err := strconv.ParseUint(string(expKey), 10, 64)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not parse expiration epoch")
|
||||
} else if expiresAt >= epoch {
|
||||
return nil
|
||||
}
|
||||
|
||||
return bktExpired.ForEach(func(idKey, _ []byte) error {
|
||||
id := object.NewID()
|
||||
|
||||
err = id.Parse(string(idKey))
|
||||
|
|
Loading…
Reference in a new issue