PG: update stats from master only if not backfilling

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
This commit is contained in:
Samuel Just 2011-12-22 14:32:15 -08:00
parent 298b134981
commit 8b8aab8473

View File

@ -453,7 +453,8 @@ void PG::merge_log(ObjectStore::Transaction& t,
info.last_update = log.head = olog.head;
if (oinfo.stats.reported < info.stats.reported) // make sure reported always increases
oinfo.stats.reported = info.stats.reported;
info.stats = oinfo.stats;
if (info.last_backfill.is_max())
info.stats = oinfo.stats;
// process divergent items
if (!divergent.empty()) {
@ -3375,7 +3376,9 @@ void PG::proc_primary_info(ObjectStore::Transaction &t, const Info &oinfo)
{
assert(!is_primary());
assert(is_stray() || is_active());
info.stats = oinfo.stats;
if (info.last_backfill.is_max())
info.stats = oinfo.stats;
osd->unreg_last_pg_scrub(info.pgid, info.history.last_scrub_stamp);
info.history.merge(oinfo.history);