]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: explicitly abort on LOST_REVERT in PG log. 44338/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 16 Dec 2021 16:01:32 +0000 (16:01 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 16 Dec 2021 16:02:32 +0000 (16:02 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg_recovery.cc

index e076b1c817fd8d0e9e38c55a9ef732f0ecf530a8..d5f261e26bf5a55cb689df299798e4843824017d 100644 (file)
@@ -323,6 +323,16 @@ void PGRecovery::on_local_recover(
   const bool is_delete,
   ceph::os::Transaction& t)
 {
+  if (const auto &log = pg->get_peering_state().get_pg_log();
+      !is_delete &&
+      log.get_missing().is_missing(recovery_info.soid) &&
+      log.get_missing().get_items().find(recovery_info.soid)->second.need > recovery_info.version) {
+    assert(pg->is_primary());
+    if (const auto* latest = log.get_log().objects.find(recovery_info.soid)->second;
+        latest->op == pg_log_entry_t::LOST_REVERT) {
+      ceph_abort("mark_unfound_lost (LOST_REVERT) is not implemented yet");
+    }
+  }
   pg->get_peering_state().recover_got(soid,
       recovery_info.version, is_delete, t);