Skip to content

Commit

Permalink
chore: mute some reclaim check log (#3469)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Ma <[email protected]>
  • Loading branch information
jim3ma authored Aug 28, 2024
1 parent 58b612f commit b23b18d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/daemon/storage/local_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 3 additions & 2 deletions client/daemon/storage/storage_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b23b18d

Please sign in to comment.