mon: Let any EC position lead a PG with sticky_primaries #213

Open
koolkhel wants to merge 2 commits from koolkhel/vitastor:mon-sticky-ec-parity into master

2 Commits

Author SHA1 Message Date
990709ec3a mon: Branch on counts next to the replicated check, share the rebalance test loop 2026-12-01 15:32:43 +03:00
1a26f16a12 mon: Let any EC position lead a PG with sticky_primaries
OSD sets from optimize_change() come in host order (RuleCombinator is
created without `ordered`, only optimize_initial() rotates the sets),
and EC primaries are picked from data positions only. So after a host
was out and back, a host was added or a weight changed, the last
parity_chunks hosts lead almost no PG: with 12 hosts and EC 8+2, hosts
11 and 12 lead none. With sticky_primaries, pick the least loaded live
OSD of any position. Turning the option on moves no live primary; the
calm rebalance then evens them out.
2026-12-01 14:57:21 +03:00