The missing items is picked from primary and peers, so it is normal if
some guys missing the same version, assertion on the next line will check
wrong circumstances.
Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
if (j == needs_recovery_map.end()) {
needs_recovery_map.insert(*i);
} else {
- lgeneric_dout(pg->cct, 0) << this << " " << pg->info.pgid << " unexpected need for "
- << i->first << " have " << j->second
- << " tried to add " << i->second << dendl;
- ceph_assert(i->second.need == j->second.need);
+ if (i->second.need != j->second.need) {
+ lgeneric_dout(pg->cct, 0) << this << " " << pg->info.pgid << " unexpected need for "
+ << i->first << " have " << j->second
+ << " tried to add " << i->second << dendl;
+ ceph_assert(0 == "unexpected need for missing item");
+
+ }
}
}
}