Merge pull request #28430 from cbodley/wip-40187

cls/rgw: keep issuing bilog trim ops after reset

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
This commit is contained in:
Casey Bodley 2019-06-24 11:46:45 -04:00 committed by GitHub
commit b338c649ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,14 +276,14 @@ public:
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;
}
@ -295,6 +295,14 @@ public:
// 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;
}
}
}
}