Merge pull request #13569 from athanatos/wip-17831-18583-18809-18927

ReplicatedBackend: don't queue Context outside of ObjectStore with obc

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-02-23 09:22:02 -06:00 committed by GitHub
commit 292306cdfb
2 changed files with 6 additions and 4 deletions

View File

@ -880,7 +880,11 @@ struct C_ReplicatedBackend_OnPullComplete : GenContext<ThreadPool::TPHandle&> {
void finish(ThreadPool::TPHandle &handle) override {
ReplicatedBackend::RPGHandle *h = bc->_open_recovery_op();
for (auto &&i: to_continue) {
if (!bc->start_pushes(i.hoid, i.obc, h)) {
auto j = bc->pulling.find(i.hoid);
assert(j != bc->pulling.end());
ObjectContextRef obc = j->second.obc;
bc->clear_pull(j);
if (!bc->start_pushes(i.hoid, obc, h)) {
bc->get_parent()->on_global_recover(
i.hoid, i.stat);
}
@ -1871,10 +1875,9 @@ bool ReplicatedBackend::handle_pull_response(
if (complete) {
pi.stat.num_objects_recovered++;
to_continue->push_back({hoid, pi.obc, pi.stat});
to_continue->push_back({hoid, pi.stat});
get_parent()->on_local_recover(
hoid, pi.recovery_info, pi.obc, t);
clear_pull(pulling.find(hoid));
return false;
} else {
response->soid = pop.soid;

View File

@ -243,7 +243,6 @@ private:
struct pull_complete_info {
hobject_t hoid;
ObjectContextRef obc;
object_stat_sum_t stat;
};
bool handle_pull_response(