Optimized EC pools encode pgtemp in a different order putting the shards
which cannot become the primary (nonprimary shards) last.
prime_pg_temp is missing a call to pgtemp_primaryfirst to reorder the
acting set it is trying to set as pg_temp.
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
(cherry picked from commit
95da0cdf96da96ba14cfbc5ee9489aabf9e10fbf)
{
std::lock_guard l(prime_pg_temp_lock);
// do not touch a mapping if a change is pending
+ std::vector<int> pg_temp = pool ? next.pgtemp_primaryfirst(*pool, acting) :
+ acting;
pending_inc.new_pg_temp.emplace(
pgid,
- mempool::osdmap::vector<int>(acting.begin(), acting.end()));
+ mempool::osdmap::vector<int>(pg_temp.begin(), pg_temp.end()));
}
}