diff --git a/cmd/api-errors.go b/cmd/api-errors.go index 3adcc1854..6ed791268 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -2186,7 +2186,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { apiErr = ErrTransitionStorageClassNotFoundError case InvalidObjectState: apiErr = ErrInvalidObjectState - + case PreConditionFailed: + apiErr = ErrPreconditionFailed case BucketQuotaExceeded: apiErr = ErrAdminBucketQuotaExceeded case *event.ErrInvalidEventName: diff --git a/cmd/metacache-walk.go b/cmd/metacache-walk.go index dadf67ad5..d1abb15a4 100644 --- a/cmd/metacache-walk.go +++ b/cmd/metacache-walk.go @@ -324,7 +324,12 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ case isSysErrNotDir(err): // skip default: - logger.LogIf(ctx, err) + // It is totally possible that xl.meta was overwritten + // while being concurrently listed at the same time in + // such scenarios the 'xl.meta' might get truncated + if !IsErrIgnored(err, io.EOF, io.ErrUnexpectedEOF) { + logger.LogIf(ctx, err) + } } }