#endif
PG::RecoveryCtx rctx = create_context();
+ rctx.handle = &handle;
int started;
bool more = pg->start_recovery_ops(max, &rctx, handle, &started);
epoch_t same_interval_since = 0;
OSDMapRef curmap = service.get_osdmap();
PG::RecoveryCtx rctx = create_context();
+ rctx.handle = &handle;
for (list<PG*>::const_iterator i = pgs.begin();
i != pgs.end();
++i) {
if (compat_must_dispatch_immediately(pg)) {
dispatch_context(rctx, pg, curmap, &handle);
rctx = create_context();
+ rctx.handle = &handle;
} else {
dispatch_context_transaction(rctx, pg, &handle);
}
{
unsigned num_unfound_before = missing_loc.num_unfound();
bool found_missing = missing_loc.add_source_info(
- from, oinfo, omissing);
+ from, oinfo, omissing, ctx->handle);
if (found_missing && num_unfound_before != missing_loc.num_unfound())
publish_stats_to_osd();
if (found_missing &&
bool PG::MissingLoc::add_source_info(
pg_shard_t fromosd,
const pg_info_t &oinfo,
- const pg_missing_t &omissing)
+ const pg_missing_t &omissing,
+ ThreadPool::TPHandle* handle)
{
bool found_missing = false;
// found items?
++p) {
const hobject_t &soid(p->first);
eversion_t need = p->second.need;
+ if (handle) {
+ handle->reset_tp_timeout();
+ }
if (oinfo.last_update < need) {
dout(10) << "search_for_missing " << soid << " " << need
<< " also missing on osd." << fromosd
// past intervals.
might_have_unfound.clear();
if (needs_recovery()) {
- missing_loc.add_source_info(pg_whoami, info, pg_log.get_missing());
+ missing_loc.add_source_info(pg_whoami, info, pg_log.get_missing(), ctx->handle);
for (set<pg_shard_t>::iterator i = actingbackfill.begin();
i != actingbackfill.end();
++i) {
missing_loc.add_source_info(
*i,
peer_info[*i],
- peer_missing[*i]);
+ peer_missing[*i],
+ ctx->handle);
}
for (map<pg_shard_t, pg_missing_t>::iterator i = peer_missing.begin();
i != peer_missing.end();
bool add_source_info(
pg_shard_t source, ///< [in] source
const pg_info_t &oinfo, ///< [in] info
- const pg_missing_t &omissing ///< [in] (optional) missing
+ const pg_missing_t &omissing, ///< [in] (optional) missing
+ ThreadPool::TPHandle* handle ///< [in] ThreadPool handle
); ///< @return whether a new object location was discovered
/// Uses osdmap to update structures for now down sources
C_Contexts *on_applied;
C_Contexts *on_safe;
ObjectStore::Transaction *transaction;
+ ThreadPool::TPHandle* handle;
RecoveryCtx(map<int, map<spg_t, pg_query_t> > *query_map,
map<int,
vector<pair<pg_notify_t, pg_interval_map_t> > > *info_map,
notify_list(notify_list),
on_applied(on_applied),
on_safe(on_safe),
- transaction(transaction) {}
+ transaction(transaction),
+ handle(NULL) {}
RecoveryCtx(BufferedRecoveryMessages &buf, RecoveryCtx &rctx)
: query_map(&(buf.query_map)),
notify_list(&(buf.notify_list)),
on_applied(rctx.on_applied),
on_safe(rctx.on_safe),
- transaction(rctx.transaction) {}
+ transaction(rctx.transaction),
+ handle(NULL) {}
void accept_buffered_messages(BufferedRecoveryMessages &m) {
assert(query_map);