if (num_missing == num_unfound) {
// All of the missing objects we have are unfound.
// Recover the replicas.
- started = recover_replicas(max);
+ started = recover_replicas(max, handle);
}
if (!started) {
// We still have missing objects that we should grab from replicas.
- started += recover_primary(max);
+ started += recover_primary(max, handle);
}
if (!started && num_unfound != get_num_unfound()) {
// second chance to recovery replicas
- started = recover_replicas(max);
+ started = recover_replicas(max, handle);
}
bool deferred_backfill = false;
* do one recovery op.
* return true if done, false if nothing left to do.
*/
-int ReplicatedPG::recover_primary(int max)
+int ReplicatedPG::recover_primary(int max, ThreadPool::TPHandle &handle)
{
assert(is_primary());
map<version_t, hobject_t>::const_iterator p =
missing.rmissing.lower_bound(pg_log.get_log().last_requested);
while (p != missing.rmissing.end()) {
+ handle.reset_tp_timeout();
hobject_t soid;
version_t v = p->first;
return 1;
}
-int ReplicatedPG::recover_replicas(int max)
+int ReplicatedPG::recover_replicas(int max, ThreadPool::TPHandle &handle)
{
dout(10) << __func__ << "(" << max << ")" << dendl;
int started = 0;
for (map<version_t, hobject_t>::const_iterator p = m.rmissing.begin();
p != m.rmissing.end() && started < max;
++p) {
+ handle.reset_tp_timeout();
const hobject_t soid(p->second);
if (pushing.count(soid)) {
for (map<hobject_t, eversion_t>::iterator i = to_remove.begin();
i != to_remove.end();
++i) {
+ handle.reset_tp_timeout();
send_remove_op(i->first, i->second, backfill_target);
}
for (map<hobject_t, pair<eversion_t, eversion_t> >::iterator i = to_push.begin();
i != to_push.end();
++i) {
+ handle.reset_tp_timeout();
prep_backfill_object_push(
i->first, i->second.first, i->second.second, backfill_target, &pushes);
}
int max, RecoveryCtx *prctx,
ThreadPool::TPHandle &handle);
- int recover_primary(int max);
- int recover_replicas(int max);
+ int recover_primary(int max, ThreadPool::TPHandle &handle);
+ int recover_replicas(int max, ThreadPool::TPHandle &handle);
int recover_backfill(int max, ThreadPool::TPHandle &handle);
/**