mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fs: Return faster on no ListObjects results (#12525)
When no results are sent `result.end` is never sent, so the list becomes hot until the list is full. Break immediately when channel is closed. Fixes #12518
This commit is contained in:
parent
e4fbc6a9ff
commit
ef99438695
@ -22,7 +22,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/minio/minio/internal/sync/errgroup"
|
||||
)
|
||||
|
||||
@ -289,6 +289,7 @@ func listObjects(ctx context.Context, obj ObjectLayer, bucket, prefix, marker, d
|
||||
if !ok {
|
||||
// Closed channel.
|
||||
eof = true
|
||||
break
|
||||
}
|
||||
|
||||
if HasSuffix(walkResult.entry, SlashSeparator) {
|
||||
|
Loading…
Reference in New Issue
Block a user