If the score did not improve, we should clear out any
pending pg-upmap-primary mappings so they don't execute
in situations where the same incremental is used to balance
multiple pools (i.e. in the balancer mgr module).
Signed-off-by: Laura Flores <lflores@ibm.com>
num_changes++;
}
}
+ } else { // clear out any mappings that were made since the score didn't improve
+ for (auto [pg, mapped] : prim_pgs_to_check) {
+ if (mapped) {
+ pending_inc->new_pg_upmap_primary.erase(pg);
+ }
+ }
}
ldout(cct, 10) << __func__ << " num_changes " << num_changes << dendl;