[#1674] *: Expire entities after the expiration epoch

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-05 08:48:42 +03:00 committed by LeL
parent f1572a674b
commit 4afb928ab6
6 changed files with 10 additions and 10 deletions

View file

@ -112,9 +112,9 @@ func objectStatus(tx *bbolt.Tx, addr oid.Address, currEpoch uint64) uint8 {
expirationBucket := tx.Bucket(attributeBucketName(addr.Container(), objectV2.SysAttributeExpEpoch))
if expirationBucket != nil {
// bucket that contains objects that expire in the current epoch
currEpochBkt := expirationBucket.Bucket([]byte(strconv.FormatUint(currEpoch, 10)))
if currEpochBkt != nil {
if currEpochBkt.Get(rawOID) != nil {
prevEpochBkt := expirationBucket.Bucket([]byte(strconv.FormatUint(currEpoch-1, 10)))
if prevEpochBkt != nil {
if prevEpochBkt.Get(rawOID) != nil {
expired = true
}
}