Skip to content

Commit

Permalink
Merge pull request #29326 from smithfarm/wip-40540-nautilus
Browse files Browse the repository at this point in the history
nautilus: rgw: multisite: 'radosgw-admin bilog trim' stops after 1000 entries

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
yuriw committed Aug 18, 2019
2 parents c40045c + 4c4def2 commit fb230f0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/cls/rgw/cls_rgw_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ class CLSRGWConcurrentIO {
break;
}

int num_completions, r = 0;
int num_completions = 0, r = 0;
map<int, string> objs;
map<int, string> *pobjs = (need_multiple_rounds() ? &objs : NULL);
while (manager.wait_for_completions(valid_ret_code(), &num_completions, &r, pobjs)) {
if (r >= 0 && ret >= 0) {
for(int i = 0; i < num_completions && iter != objs_container.end(); ++i, ++iter) {
for (; num_completions && iter != objs_container.end(); --num_completions, ++iter) {
int issue_ret = issue_op(iter->first, iter->second);
if(issue_ret < 0) {
if (issue_ret < 0) {
ret = issue_ret;
break;
}
Expand All @@ -295,6 +295,14 @@ class CLSRGWConcurrentIO {
// For those objects which need another round, use them to reset
// the container
reset_container(objs);
iter = objs_container.begin();
for (; num_completions && iter != objs_container.end(); --num_completions, ++iter) {
int issue_ret = issue_op(iter->first, iter->second);
if (issue_ret < 0) {
ret = issue_ret;
break;
}
}
}
}

Expand Down

0 comments on commit fb230f0

Please sign in to comment.