mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
When listing, do not count delete markers (#15689)
When limiting listing do not count delete, since they may be discarded. Extend limit, since we may be discarding the forward-to marker. Fix directories always being sent to resolve, since they didn't return as match.
This commit is contained in:
@@ -768,8 +768,8 @@ func (es *erasureSingle) listPathInner(ctx context.Context, o listPathOptions, r
|
||||
|
||||
var limit int
|
||||
if o.Limit > 0 && o.StopDiskAtLimit {
|
||||
// Over-read by 1 to know if we truncate results.
|
||||
limit = o.Limit + 1
|
||||
// Over-read by 2 to know if we truncate results and not reach false EOF.
|
||||
limit = o.Limit + 2
|
||||
}
|
||||
|
||||
ctxDone := ctx.Done()
|
||||
@@ -842,9 +842,9 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions, resul
|
||||
}
|
||||
var limit int
|
||||
if o.Limit > 0 && o.StopDiskAtLimit {
|
||||
// Over-read by 2 + 1 for every 16 in limit to give some space for resolver
|
||||
// And know if we have truncated.
|
||||
limit = o.Limit + 2 + (o.Limit / 16)
|
||||
// Over-read by 4 + 1 for every 16 in limit to give some space for resolver,
|
||||
// allow for truncating the list and know if we have more results.
|
||||
limit = o.Limit + 4 + (o.Limit / 16)
|
||||
}
|
||||
ctxDone := ctx.Done()
|
||||
return listPathRaw(ctx, listPathRawOptions{
|
||||
|
||||
Reference in New Issue
Block a user