From a71a0d36c1fced9e28581f4bd269d4f1cdb51fe2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 5 Jan 2012 09:26:12 -0800 Subject: [PATCH] osd: log backfill restart This is interesting, particularly in determining when a peer that was partially backfilled needs to be restarted. Signed-off-by: Sage Weil --- src/osd/PG.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a33484392a33c..5892b95112907 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1237,6 +1237,10 @@ void PG::activate(ObjectStore::Transaction& t, list& tfin, dout(10) << "activate peer osd." << peer << " " << pi << dendl; if (log.tail > pi.last_update || pi.last_backfill == hobject_t()) { + osd->clog.info() << info.pgid << " restarting backfill on osd." << peer + << " from (" << pi.log_tail << "," << pi.last_update << "] " << pi.last_backfill + << " to " << info.last_update; + // reset, backfill // we need to do this even when last_backfill == hobject_t() to ensure that // stats get zeroed out properly, etc. @@ -1251,6 +1255,7 @@ void PG::activate(ObjectStore::Transaction& t, list& tfin, peer_missing[peer].clear(); dout(10) << "activate peer osd." << peer << " must (re)start backfill, sending info " << pi << dendl; + if (activator_map) { if (activator_map->count(peer) == 0) (*activator_map)[peer] = new MOSDPGInfo(get_osdmap()->get_epoch()); -- 2.39.5