From 408c21d8f052581a962a95cf3feb07f9ea2e5a2e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 4 Nov 2023 23:45:59 +0300 Subject: [PATCH] Scale last_clean_pgs PG count even if current PGs already contain the new number of PGs --- mon/mon.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mon/mon.js b/mon/mon.js index 63bc1bd2..87dc83b7 100644 --- a/mon/mon.js +++ b/mon/mon.js @@ -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;