Scale last_clean_pgs PG count even if current PGs already contain the new number of PGs

Vitaliy Filippov 2023-11-04 23:45:59 +03:00
parent 43cb9ae212
commit 408c21d8f0
1 changed files with 6 additions and 0 deletions

View File

@ -1304,6 +1304,12 @@ class Mon
this.schedule_recheck();
return;
}
}
if (prev_pgs.length != pool_cfg.pg_count)
{
// Scale PG count
// Do it even if old_pg_count is already equal to pool_cfg.pg_count,
// because last_clean_pgs may still contain the old number of PGs
const new_pg_history = [];
PGUtil.scale_pg_count(prev_pgs, real_prev_pgs, pg_history, new_pg_history, pool_cfg.pg_count);
pg_history = new_pg_history;