From: Xuehan Xu Date: Tue, 18 Jul 2023 06:14:50 +0000 (+0800) Subject: crimson/osd/object_context: consider clones found as long as they're in X-Git-Tag: v19.0.0~595^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=957fd43e4b09a7607d4db52fe9674be905f76de8;p=ceph-ci.git crimson/osd/object_context: consider clones found as long as they're in SnapSet::clones Fixes: https://tracker.ceph.com/issues/61825 Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/object_context_loader.cc b/src/crimson/osd/object_context_loader.cc index 939ce536822..0a4d74c0d70 100644 --- a/src/crimson/osd/object_context_loader.cc +++ b/src/crimson/osd/object_context_loader.cc @@ -98,14 +98,13 @@ using crimson::common::local_conf; crimson::ct_error::enoent::make() }; } - auto coid = resolve_oid(head->get_head_ss(), oid); - if (!coid) { - ERRORDPP("clone {} not found", dpp, oid); - return load_obc_iertr::future<>{ - crimson::ct_error::enoent::make() - }; - } - auto [clone, existed] = obc_registry.get_cached_obc(*coid); +#ifndef NDEBUG + auto &ss = head->get_head_ss(); + auto cit = std::find( + std::begin(ss.clones), std::end(ss.clones), oid.snap); + assert(cit != std::end(ss.clones)); +#endif + auto [clone, existed] = obc_registry.get_cached_obc(oid); return clone->template with_lock( [existed=existed, clone=std::move(clone), func=std::move(func), head=std::move(head), this]()