From d0359f7c1cae282ac96f44aa0dea09677743a8fb Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Sun, 23 Feb 2014 13:29:07 -0800 Subject: [PATCH] PG: clarify same_primary_since updates regarding primary rank pg_shard_t includes the position, so these checks handle same osd/different rank properly. Signed-off-by: Samuel Just --- src/osd/PG.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index b7338bfb9ee2d..164dc3ad4240f 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2054,6 +2054,8 @@ void PG::split_into(pg_t child_pgid, PG *child, unsigned split_bits) up_primary, primary); child->role = OSDMap::calc_pg_role(osd->whoami, child->acting); + + // this comparison includes primary rank via pg_shard_t if (get_primary() != child->get_primary()) child->info.history.same_primary_since = get_osdmap()->get_epoch(); @@ -4705,6 +4707,7 @@ void PG::start_peering_interval( oldup != up) { info.history.same_up_since = osdmap->get_epoch(); } + // this comparison includes primary rank via pg_shard_t if (old_acting_primary != get_primary()) { info.history.same_primary_since = osdmap->get_epoch(); } -- 2.39.5