]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg_recovery: skip unfound objects when recovering the 57147/head
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 30 Apr 2024 06:55:45 +0000 (14:55 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Mon, 10 Jun 2024 04:03:05 +0000 (12:03 +0800)
primary

Fixes: https://tracker.ceph.com/issues/65696
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/pg_recovery.cc

index 13ac069c63d4166eaae66c4eb2aacf99792635f5..f9c2b02997db1539cd3fb571553470819bc4fa88 100644 (file)
@@ -135,11 +135,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 {} {} {} {} {}",