listing must return WalkDir() errors first (#19006)

This commit is contained in:
Harshavardhana 2024-02-07 13:20:07 -08:00 committed by GitHub
parent 5b1a74b6b2
commit d28bf71f25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -305,6 +305,15 @@ func (z *erasureServerPools) listMerged(ctx context.Context, o listPathOptions,
cancelList() cancelList()
wg.Wait() wg.Wait()
// we should return 'errs' from per disk
if isAllNotFound(errs) {
if isAllVolumeNotFound(errs) {
return errVolumeNotFound
}
return nil
}
if err != nil { if err != nil {
return err return err
} }
@ -313,13 +322,6 @@ func (z *erasureServerPools) listMerged(ctx context.Context, o listPathOptions,
return ctx.Err() return ctx.Err()
} }
if isAllNotFound(errs) {
if isAllVolumeNotFound(errs) {
return errVolumeNotFound
}
return nil
}
for _, err := range errs { for _, err := range errs {
if errors.Is(err, io.EOF) { if errors.Is(err, io.EOF) {
continue continue