allow ListObjects() when a prefix is an object (#17074)

This commit is contained in:
Harshavardhana
2023-04-25 22:41:54 -07:00
committed by GitHub
parent dbd53af369
commit b1f3935c5b
3 changed files with 5 additions and 13 deletions
+2 -7
View File
@@ -552,6 +552,8 @@ func readAllXL(ctx context.Context, disks []StorageAPI, bucket, object string, r
errVolumeNotFound,
errFileVersionNotFound,
errDiskNotFound,
io.ErrUnexpectedEOF, // some times we would read without locks, ignore these errors
io.EOF, // some times we would read without locks, ignore these errors
}
errs := g.Wait()
@@ -559,13 +561,6 @@ func readAllXL(ctx context.Context, disks []StorageAPI, bucket, object string, r
if err == nil {
continue
}
if bucket == minioMetaBucket {
// minioMetaBucket "reads" for .metacache are not written with O_SYNC
// so there is a potential for them to not fully committed to stable
// storage leading to unexpected EOFs. Allow these failures to
// be ignored since the caller already ignores them in streamMetadataParts()
ignoredErrs = append(ignoredErrs, io.ErrUnexpectedEOF, io.EOF)
}
if !IsErr(err, ignoredErrs...) {
logger.LogOnceIf(ctx, fmt.Errorf("Drive %s, path (%s/%s) returned an error (%w)",
disks[index], bucket, object, err),