Fixes: #7672
Signed-off-by: Samuel Just <sam.just@inktank.com>
boost::scoped_ptr<PGBackend::IsRecoverablePredicate> recoverable_predicate(
get_pgbackend()->get_is_recoverable_predicate());
set<pg_shard_t> have;
- for (int i = 0; i < (int)want.size(); ++i)
- have.insert(
- pg_shard_t(
- want[i],
- pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
+ for (int i = 0; i < (int)want.size(); ++i) {
+ if (want[i] != CRUSH_ITEM_NONE)
+ have.insert(
+ pg_shard_t(
+ want[i],
+ pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
+ }
if (!(*recoverable_predicate)(have)) {
want_acting.clear();
return false;