pg_shard_t includes the position, so these checks handle
same osd/different rank properly.
Signed-off-by: Samuel Just <sam.just@inktank.com>
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();
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();
}