mirror of
https://github.com/ceph/ceph
synced 2025-03-30 07:19:14 +00:00
Merge pull request #30146 from ivancich/wip-fix-min-unordered-bkt-list
rgw: fix minimum of unordered bucket listing Reviewed-by: Casey Bodley <cbodley@redhat.com> Reviewed-by: Mark Kogan <mkogan@redhat.com>
This commit is contained in:
commit
01263b792a
@ -1749,7 +1749,7 @@ int RGWRados::Bucket::List::list_objects_ordered(int64_t max_p,
|
||||
|
||||
int count = 0;
|
||||
bool truncated = true;
|
||||
const int64_t max = // protect against memory issues and non-positive vals
|
||||
const int64_t max = // protect against memory issues and negative vals
|
||||
std::min(bucket_list_objects_absolute_max, std::max(int64_t(0), max_p));
|
||||
int read_ahead = std::max(cct->_conf->rgw_list_bucket_min_readahead, max);
|
||||
|
||||
@ -1942,8 +1942,8 @@ int RGWRados::Bucket::List::list_objects_unordered(int64_t max_p,
|
||||
int count = 0;
|
||||
bool truncated = true;
|
||||
|
||||
const int64_t max = // protect against memory issues and non-positive vals
|
||||
std::min(bucket_list_objects_absolute_max, std::max(int64_t(1), max_p));
|
||||
const int64_t max = // protect against memory issues and negative vals
|
||||
std::min(bucket_list_objects_absolute_max, std::max(int64_t(0), max_p));
|
||||
|
||||
// read a few extra in each call to cls_bucket_list_unordered in
|
||||
// case some are filtered out due to namespace matching, versioning,
|
||||
|
Loading…
Reference in New Issue
Block a user