mirror of
https://github.com/ceph/ceph
synced 2025-01-09 20:52:09 +00:00
OSD: account for split in project_pg_history
split causes a new interval. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
15d899370f
commit
9f169ac0f5
@ -1796,6 +1796,7 @@ void OSD::project_pg_history(pg_t pgid, pg_history_t& h, epoch_t from,
|
||||
e--) {
|
||||
// verify during intermediate epoch (e-1)
|
||||
OSDMapRef oldmap = get_map(e-1);
|
||||
assert(oldmap->have_pg_pool(pgid.pool()));
|
||||
|
||||
vector<int> up, acting;
|
||||
oldmap->pg_to_up_acting_osds(pgid, up, acting);
|
||||
@ -1808,6 +1809,12 @@ void OSD::project_pg_history(pg_t pgid, pg_history_t& h, epoch_t from,
|
||||
<< dendl;
|
||||
h.same_interval_since = e;
|
||||
}
|
||||
// split?
|
||||
if (pgid.is_split(oldmap->get_pg_num(pgid.pool()),
|
||||
osdmap->get_pg_num(pgid.pool()),
|
||||
0)) {
|
||||
h.same_interval_since = e;
|
||||
}
|
||||
// up set change?
|
||||
if (up != currentup && e > h.same_up_since) {
|
||||
dout(15) << "project_pg_history " << pgid << " up changed in " << e
|
||||
|
Loading…
Reference in New Issue
Block a user