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:
Klaus Post
2022-09-09 17:13:06 +02:00
committed by GitHub
parent b579163802
commit ff9a74b91f
4 changed files with 51 additions and 4 deletions

View File

@@ -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)