Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: rgw: fix break inside of yield in RGWFetchAllMetaCR #14067

Merged
merged 1 commit into from Jul 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 19 additions & 21 deletions src/rgw/rgw_sync.cc
Expand Up @@ -837,27 +837,25 @@ class RGWFetchAllMetaCR : public RGWCoroutine {
}
iter = result.begin();
for (; iter != result.end(); ++iter) {
RGWRados *store;
int ret;
yield {
if (!lease_cr->is_locked()) {
lost_lock = true;
break;
}
ldout(cct, 20) << "list metadata: section=" << *sections_iter << " key=" << *iter << dendl;
string s = *sections_iter + ":" + *iter;
int shard_id;
store = sync_env->store;
ret = store->meta_mgr->get_log_shard_id(*sections_iter, *iter, &shard_id);
if (ret < 0) {
ldout(cct, 0) << "ERROR: could not determine shard id for " << *sections_iter << ":" << *iter << dendl;
ret_status = ret;
break;
}
if (!entries_index->append(s, shard_id)) {
break;
}
}
if (!lease_cr->is_locked()) {
lost_lock = true;
break;
}
yield; // allow entries_index consumer to make progress

ldout(cct, 20) << "list metadata: section=" << *sections_iter << " key=" << *iter << dendl;
string s = *sections_iter + ":" + *iter;
int shard_id;
RGWRados *store = sync_env->store;
int ret = store->meta_mgr->get_log_shard_id(*sections_iter, *iter, &shard_id);
if (ret < 0) {
ldout(cct, 0) << "ERROR: could not determine shard id for " << *sections_iter << ":" << *iter << dendl;
ret_status = ret;
break;
}
if (!entries_index->append(s, shard_id)) {
break;
}
}
}
yield {
Expand Down