mon: Do not rewrite unchanged last_clean_pgs #212

Open
koolkhel wants to merge 1 commits from koolkhel/vitastor:mon-last-clean-unchanged into master

1 Commits

Author SHA1 Message Date
d239caec38 mon: Do not rewrite unchanged last_clean_pgs
save_last_clean() runs after every batch of PG state changes and put the
whole last_clean_pgs map even when it did not change. While any PG of a
pool is not active the value stays the same, so during mass peering
every batch writes another copy of a map as large as /pg/config (about
177 KB for 2048 EC 8+2 PGs). Each copy stays in the etcd history until
the next compaction, and its watch event makes the monitor run
recheck_pgs again.

Write last_clean_pgs only when its value changes.
2026-11-30 17:39:35 +03:00