From b23b18d1139c9d98c499d652ab186124daf15d0b Mon Sep 17 00:00:00 2001 From: Jim Ma Date: Wed, 28 Aug 2024 16:58:17 +0800 Subject: [PATCH] chore: mute some reclaim check log (#3469) Signed-off-by: Jim Ma --- client/daemon/storage/local_storage.go | 3 ++- client/daemon/storage/storage_manager.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/daemon/storage/local_storage.go b/client/daemon/storage/local_storage.go index b5c15ce6d70..76c413fa9a3 100644 --- a/client/daemon/storage/local_storage.go +++ b/client/daemon/storage/local_storage.go @@ -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 } diff --git a/client/daemon/storage/storage_manager.go b/client/daemon/storage/storage_manager.go index 2ae420b137a..bbec8ec482e 100644 --- a/client/daemon/storage/storage_manager.go +++ b/client/daemon/storage/storage_manager.go @@ -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