Reduce logging when peer is offline (#11184)

This commit is contained in:
Ritesh H Shukla
2020-12-30 14:38:54 -08:00
committed by GitHub
parent 428f288379
commit 556524c715
2 changed files with 15 additions and 10 deletions

View File

@@ -140,9 +140,8 @@ func readVersionFromDisks(ctx context.Context, disks []StorageAPI, bucket, objec
}
metadataArray[index], err = disks[index].ReadVersion(ctx, bucket, object, versionID, checkDataDir)
if err != nil {
if err != errFileNotFound && err != errVolumeNotFound && err != errFileVersionNotFound {
logger.GetReqInfo(ctx).AppendTags("disk", disks[index].String())
logger.LogIf(ctx, err)
if !IsErr(err, errFileNotFound, errVolumeNotFound, errFileVersionNotFound, errDiskNotFound) {
logger.LogOnceIf(ctx, err, disks[index].String())
}
}
return err