chore: mute some reclaim check log (#3469)

Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
Jim Ma 2024-08-28 16:58:17 +08:00 committed by GitHub
parent 58b612fb3a
commit b23b18d113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -516,7 +516,8 @@ func (t *localTaskStore) CanReclaim() bool {
// task soft cache time reached
access := time.Unix(0, t.lastAccess.Load())
reclaim := access.Add(t.expireTime).Before(now)
t.Debugf("reclaim check, last access: %v, reclaim: %v", access, reclaim)
// TODO add a option to avoid print log too frequently
// t.Debugf("reclaim check, last access: %v, reclaim: %v", access, reclaim)
if reclaim || t.Header == nil {
return reclaim
}

View File

@ -881,8 +881,9 @@ func (s *storageManager) TryGC() (bool, error) {
if ok {
// just calculate not reclaimed task
totalNotMarkedSize += lts.ContentLength
logger.Debugf("task %s/%s not reach gc time",
key.(PeerTaskMetadata).TaskID, key.(PeerTaskMetadata).PeerID)
// TODO add a option to avoid print log too frequently
// logger.Debugf("task %s/%s not reach gc time",
// key.(PeerTaskMetadata).TaskID, key.(PeerTaskMetadata).PeerID)
}
}
return true