Merge pull request #8744 from filecoin-project/fix/storagestat-log-spam

fix: worker: don't log normal storage stat calls
This commit is contained in:
Łukasz Magiera 2022-05-27 20:03:49 +02:00 committed by GitHub
commit 2b5114eb12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,9 @@ func (p *path) stat(ls LocalStorage) (fsutil.FsStat, error) {
}
}
log.Infow("storage stat", "took", time.Now().Sub(start), "reservations", len(p.reservations))
if time.Now().Sub(start) > 5*time.Second {
log.Warnw("slow storage stat", "took", time.Now().Sub(start), "reservations", len(p.reservations))
}
return stat, err
}