|
|
|
@ -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 { |
|
|
|
|
maxCount, maxErr := reduceErrs(errs, ignoredErrs) |
|
|
|
|
if maxCount >= quorum { |
|
|
|
|
logger.LogIf(ctx, maxErr) |
|
|
|
|
if maxErr != errFileNotFound { |
|
|
|
|
logger.LogIf(ctx, maxErr) |
|
|
|
|
} |
|
|
|
|
return maxErr |
|
|
|
|
} |
|
|
|
|
logger.LogIf(ctx, quorumErr) |
|
|
|
@ -295,7 +297,9 @@ func readXLMeta(ctx context.Context, disk StorageAPI, bucket string, object stri |
|
|
|
|
// Reads entire `xl.json`.
|
|
|
|
|
xlMetaBuf, err := disk.ReadAll(bucket, path.Join(object, xlMetaJSONFile)) |
|
|
|
|
if err != nil { |
|
|
|
|
logger.LogIf(ctx, err) |
|
|
|
|
if err != errFileNotFound { |
|
|
|
|
logger.LogIf(ctx, err) |
|
|
|
|
} |
|
|
|
|
return xlMetaV1{}, err |
|
|
|
|
} |
|
|
|
|
// obtain xlMetaV1{} using `github.com/tidwall/gjson`.
|
|
|
|
|