Merge pull request #15320 from liewegas/wip-peon-mapping

mon/OSDMonitor: cancel mapping job from update_from_paxos

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2017-05-27 21:00:50 -05:00 committed by GitHub
commit c5628543ca

View File

@ -256,6 +256,15 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
dout(15) << "update_from_paxos paxos e " << version
<< ", my e " << osdmap.epoch << dendl;
if (mapping_job) {
if (!mapping_job->is_done()) {
dout(1) << __func__ << " mapping job "
<< mapping_job.get() << " did not complete, "
<< mapping_job->shards << " left, canceling" << dendl;
mapping_job->abort();
}
mapping_job.reset();
}
/*
* We will possibly have a stashed latest that *we* wrote, and we will