mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #17437 from tchaikov/wip-refactor-build_initial_pg_history
osd: update info only if new_interval Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
commit
10fedb208c
@ -4423,23 +4423,23 @@ void OSD::build_initial_pg_history(
|
||||
&debug);
|
||||
if (new_interval) {
|
||||
h->same_interval_since = e;
|
||||
}
|
||||
if (up != new_up) {
|
||||
h->same_up_since = e;
|
||||
}
|
||||
if (acting_primary != new_acting_primary) {
|
||||
h->same_primary_since = e;
|
||||
}
|
||||
if (pgid.pgid.is_split(lastmap->get_pg_num(pgid.pgid.pool()),
|
||||
osdmap->get_pg_num(pgid.pgid.pool()),
|
||||
nullptr)) {
|
||||
h->last_epoch_split = e;
|
||||
if (up != new_up) {
|
||||
h->same_up_since = e;
|
||||
}
|
||||
if (acting_primary != new_acting_primary) {
|
||||
h->same_primary_since = e;
|
||||
}
|
||||
if (pgid.pgid.is_split(lastmap->get_pg_num(pgid.pgid.pool()),
|
||||
osdmap->get_pg_num(pgid.pgid.pool()),
|
||||
nullptr)) {
|
||||
h->last_epoch_split = e;
|
||||
}
|
||||
up = new_up;
|
||||
acting = new_acting;
|
||||
up_primary = new_up_primary;
|
||||
acting_primary = new_acting_primary;
|
||||
}
|
||||
lastmap = osdmap;
|
||||
up_primary = new_up_primary;
|
||||
acting_primary = new_acting_primary;
|
||||
up = new_up;
|
||||
acting = new_acting;
|
||||
}
|
||||
dout(20) << __func__ << " " << debug.str() << dendl;
|
||||
dout(10) << __func__ << " " << *h << " " << *pi
|
||||
|
Loading…
Reference in New Issue
Block a user