Merge pull request #31355 from zhangsw/fix-rgw-reshard-max-entries

rgw: reshard list may return more than specified max_entries.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2020-01-22 10:27:43 -05:00 committed by GitHub
commit 47f9991cd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6348,7 +6348,7 @@ next:
string marker;
do {
entries.clear();
ret = reshard.list(i, marker, max_entries, entries, &is_truncated);
ret = reshard.list(i, marker, max_entries - count, entries, &is_truncated);
if (ret < 0) {
cerr << "Error listing resharding buckets: " << cpp_strerror(-ret) << std::endl;
return ret;