mirror of
https://github.com/minio/minio.git
synced 2025-04-07 05:10:30 -04:00
Do not log errFileNotFound error (#5853)
This commit is contained in:
parent
fe126de98b
commit
6831177394
@ -163,7 +163,9 @@ func fsStat(ctx context.Context, statLoc string) (os.FileInfo, error) {
|
|||||||
}
|
}
|
||||||
fi, err := os.Stat((statLoc))
|
fi, err := os.Stat((statLoc))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err != errFileNotFound {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,9 @@ func reduceErrs(errs []error, ignoredErrs []error) (maxCount int, maxErr error)
|
|||||||
func reduceQuorumErrs(ctx context.Context, errs []error, ignoredErrs []error, quorum int, quorumErr error) error {
|
func reduceQuorumErrs(ctx context.Context, errs []error, ignoredErrs []error, quorum int, quorumErr error) error {
|
||||||
maxCount, maxErr := reduceErrs(errs, ignoredErrs)
|
maxCount, maxErr := reduceErrs(errs, ignoredErrs)
|
||||||
if maxCount >= quorum {
|
if maxCount >= quorum {
|
||||||
|
if maxErr != errFileNotFound {
|
||||||
logger.LogIf(ctx, maxErr)
|
logger.LogIf(ctx, maxErr)
|
||||||
|
}
|
||||||
return maxErr
|
return maxErr
|
||||||
}
|
}
|
||||||
logger.LogIf(ctx, quorumErr)
|
logger.LogIf(ctx, quorumErr)
|
||||||
@ -295,7 +297,9 @@ func readXLMeta(ctx context.Context, disk StorageAPI, bucket string, object stri
|
|||||||
// Reads entire `xl.json`.
|
// Reads entire `xl.json`.
|
||||||
xlMetaBuf, err := disk.ReadAll(bucket, path.Join(object, xlMetaJSONFile))
|
xlMetaBuf, err := disk.ReadAll(bucket, path.Join(object, xlMetaJSONFile))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err != errFileNotFound {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
}
|
||||||
return xlMetaV1{}, err
|
return xlMetaV1{}, err
|
||||||
}
|
}
|
||||||
// obtain xlMetaV1{} using `github.com/tidwall/gjson`.
|
// obtain xlMetaV1{} using `github.com/tidwall/gjson`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user