Merge pull request #7233 from filecoin-project/fix/storage-reserved-spam

stores: Fix reserved disk usage log spam
This commit is contained in:
Łukasz Magiera 2021-08-31 18:20:52 +02:00 committed by GitHub
commit 4c607d92f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,12 @@ func (p *path) stat(ls LocalStorage) (fsutil.FsStat, error) {
used, err = ls.DiskUsage(p)
}
if err != nil {
log.Debugf("getting disk usage of '%s': %+v", p.sectorPath(id, fileType), err)
// we don't care about 'not exist' errors, as storage can be
// reserved before any files are written, so this error is not
// unexpected
if !os.IsNotExist(err) {
log.Warnf("getting disk usage of '%s': %+v", p.sectorPath(id, fileType), err)
}
continue
}