Instead fail the pull so it will try to recover from other
shards (or will mark the object missing).
Fixes: https://tracker.ceph.com/issues/48959
Signed-off-by: Mykola Golub <mgolub@suse.com>
if (op.recovery_progress.first && op.obc) {
/* We've got the attrs and the hinfo, might as well use them */
op.hinfo = get_hash_info(op.hoid);
- ceph_assert(op.hinfo);
+ if (!op.hinfo) {
+ derr << __func__ << ": " << op.hoid << " has inconsistent hinfo"
+ << dendl;
+ ceph_assert(recovery_ops.count(op.hoid));
+ eversion_t v = recovery_ops[op.hoid].v;
+ recovery_ops.erase(op.hoid);
+ get_parent()->on_failed_pull({get_parent()->whoami_shard()},
+ op.hoid, v);
+ return;
+ }
op.xattrs = op.obc->attr_cache;
encode(*(op.hinfo), op.xattrs[ECUtil::get_hinfo_key()]);
}