check both markset and txn liveset before declaring an object cold

This commit is contained in:
vyzo 2021-06-30 21:37:31 +03:00
parent 4bed3161f0
commit e29b64c5de

View File

@ -913,7 +913,12 @@ func (s *SplitStore) doCompact(curTs *types.TipSet) error {
return xerrors.Errorf("error checkiing mark set for %s: %w", cid, err)
}
if mark {
live, err := s.txnProtect.Has(cid)
if err != nil {
return xerrors.Errorf("error checking liveness for %s: %w", cid, err)
}
if mark || live {
hotCnt++
return nil
}