Add fast max-keys=1 support for Listing (#15670)
Add a listing option to stop when the limit is reached. This can be used by stateless listings for fast results.
This commit is contained in:
@@ -231,7 +231,7 @@ func (z *erasureServerPools) listPath(ctx context.Context, o *listPathOptions) (
|
||||
|
||||
go func(o listPathOptions) {
|
||||
defer wg.Done()
|
||||
o.Limit = 0
|
||||
o.StopDiskAtLimit = true
|
||||
listErr = z.listMerged(listCtx, o, filterCh)
|
||||
o.debugln("listMerged returned with", listErr)
|
||||
}(*o)
|
||||
|
||||
Reference in New Issue
Block a user