]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg_recovery: skip unfound objects when recovering the 58822/head
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 30 Apr 2024 06:55:45 +0000 (14:55 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:29:05 +0000 (10:29 +0300)
primary

Fixes: https://tracker.ceph.com/issues/65696
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 3d03ac21bd8de591e4d340e274863bca9d31b170)

src/crimson/osd/pg_recovery.cc

index b2f813447b3710a76e209e0f628d3a4b54fd2904..4ed861cfd7ef74dc48fcd6bcd705bdb8708af042 100644 (file)
@@ -146,11 +146,23 @@ size_t PGRecovery::start_primary_recovery_ops(
     } else {
       soid = p->second;
     }
-    const pg_missing_item& item = missing.get_items().find(p->second)->second;
-    ++p;
 
     hobject_t head = soid.get_head();
 
+    if (pg->get_peering_state().get_missing_loc().is_unfound(soid)) {
+      logger().debug("{}: object {} unfound", __func__, soid);
+      ++skipped;
+      continue;
+    }
+    if (pg->get_peering_state().get_missing_loc().is_unfound(head)) {
+      logger().debug("{}: head object {} unfound", __func__, soid);
+      ++skipped;
+      continue;
+    }
+
+    const pg_missing_item& item = missing.get_items().find(p->second)->second;
+    ++p;
+
     bool head_missing = missing.is_missing(head);
     logger().info(
       "{} {} item.need {} {} {} {} {}",