From 8b8aab847340f21b358de43d9d2cb363b9c8fe63 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 22 Dec 2011 14:32:15 -0800 Subject: [PATCH] PG: update stats from master only if not backfilling Signed-off-by: Samuel Just --- src/osd/PG.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index daf3dc087f9..c32bb795ee7 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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);