mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
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 <sam.just@inktank.com>
This commit is contained in:
parent
8913ab4bb5
commit
d0359f7c1c
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user