]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_operations/client_request: skip recover missings if snaps are empty
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 22 Apr 2024 03:42:41 +0000 (11:42 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 9 May 2024 02:06:39 +0000 (10:06 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/osd/osd_operations/client_request_common.cc

index 62a586ef6283a7d4ee5f16f8c87e42810a0732ae..b1c8d37f1d981107c56cdad5851eb38861614921 100644 (file)
@@ -31,6 +31,9 @@ CommonClientRequest::recover_missings(
   return do_recover_missing(
     pg, soid.get_head(), reqid
   ).then_interruptible([snaps=std::move(snaps), pg, soid, reqid]() mutable {
+    if (snaps.empty()) {
+      return ObjectContextLoader::load_obc_iertr::now();
+    }
     return pg->obc_loader.with_obc<RWState::RWREAD>(
       soid.get_head(),
       [snaps=std::move(snaps), pg, soid, reqid](auto head, auto) mutable {