]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PGLog,crimson/osd/pg: remove support for rebuild_missing_set_with_deletes_crimson
authorSamuel Just <sjust@redhat.com>
Wed, 26 Jun 2024 03:16:28 +0000 (03:16 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:54:19 +0000 (10:54 +0300)
Reverts 9c2d11af5.

PeeringListener::rebuild_missing_set_with_deletes should only be invoked
upon advancing from an OSDMap where CEPH_OSDMAP_RECOVERY_DELETES is not
set to one where it is.  That shouldn't be possible for a crimson cluster
as CEPH_OSDMAP_RECOVERY_DELETES should be set as long as
require_osd_release >= luminous, which was quite a few versions ago.
OSDMonitor::create_initial() defaults to squid, or as old as quincy
with config options.

I'm not sure this actually worked as it uses get0() on
a seastar::future<>, which won't correctly deal with the thread-local
interrupt_cond created by the interruptor::async wrapper in
PG::do_peering_event.  Additionally,
PeeringListener::rebuild_missing_set_with_deletes would have been
invoked under PeeringState::on_new_interval() while processing an
AdvMap event, but PG::handle_advance_map doesn't actually invoke
peering_state.advance_map under seastar::async or interruptor::async.

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 4c58cb5872596d9f19b38a51c088e0d185f712e3)

src/crimson/osd/pg.h
src/osd/PGLog.cc
src/osd/PGLog.h

index a6a287e6223af6b36b9ddf0e00d82389a2702bbe..92d05e06e6d1c85a0d01714e4c2811fce0d6998f 100644 (file)
@@ -399,10 +399,7 @@ public:
   }
 
   void rebuild_missing_set_with_deletes(PGLog &pglog) final {
-    pglog.rebuild_missing_set_with_deletes_crimson(
-      shard_services.get_store(),
-      coll_ref,
-      peering_state.get_info()).get();
+    ceph_assert(0 == "Impossible for crimson");
   }
 
   PerfCounters &get_peering_perf() final {
index e11eda5162f05b56c6ac5e3590c0f39044a34cb1..b759a42290cdacf7023a0b676b53f3ffe799c949 100644 (file)
@@ -1206,86 +1206,4 @@ seastar::future<> PGLog::read_log_and_missing_crimson(
   });
 }
 
-seastar::future<> PGLog::rebuild_missing_set_with_deletes_crimson(
-  crimson::os::FuturizedStore::Shard &store,
-  crimson::os::CollectionRef ch,
-  const pg_info_t &info)
-{
-  // save entries not generated from the current log (e.g. added due
-  // to repair, EIO handling, or divergent_priors).
-  map<hobject_t, pg_missing_item> extra_missing;
-  for (const auto& p : missing.get_items()) {
-    if (!log.logged_object(p.first)) {
-      ldpp_dout(this, 20) << __func__ << " extra missing entry: " << p.first
-              << " " << p.second << dendl;
-      extra_missing[p.first] = p.second;
-    }
-  }
-  missing.clear();
-
-  // go through the log and add items that are not present or older
-  // versions on disk, just as if we were reading the log + metadata
-  // off disk originally
-  return seastar::do_with(
-    set<hobject_t>(),
-    log.log.rbegin(),
-    [this, &store, ch, &info](auto &did, auto &it) {
-    return seastar::repeat([this, &store, ch, &info, &it, &did] {
-      if (it == log.log.rend()) {
-       return seastar::make_ready_future<seastar::stop_iteration>(
-         seastar::stop_iteration::yes);
-      }
-      auto &log_entry = *it;
-      it++;
-      if (log_entry.version <= info.last_complete)
-       return seastar::make_ready_future<seastar::stop_iteration>(
-         seastar::stop_iteration::yes);
-      if (log_entry.soid > info.last_backfill ||
-         log_entry.is_error() ||
-         did.find(log_entry.soid) != did.end())
-       return seastar::make_ready_future<seastar::stop_iteration>(
-         seastar::stop_iteration::no);
-      did.insert(log_entry.soid);
-      return store.get_attr(
-       ch,
-       ghobject_t(log_entry.soid, ghobject_t::NO_GEN, info.pgid.shard),
-       OI_ATTR
-      ).safe_then([this, &log_entry](auto bv) {
-       object_info_t oi(bv);
-       ldpp_dout(this, 20)
-         << "rebuild_missing_set_with_deletes_crimson found obj "
-         << log_entry.soid
-         << " version = " << oi.version << dendl;
-       if (oi.version < log_entry.version) {
-         ldpp_dout(this, 20)
-           << "rebuild_missing_set_with_deletes_crimson missing obj "
-           << log_entry.soid
-           << " for version = " << log_entry.version << dendl;
-         missing.add(
-           log_entry.soid,
-           log_entry.version,
-           oi.version,
-           log_entry.is_delete());
-       }
-      },
-      crimson::ct_error::enoent::handle([this, &log_entry] {
-       ldpp_dout(this, 20)
-         << "rebuild_missing_set_with_deletes_crimson missing object "
-         << log_entry.soid << dendl;
-       missing.add(
-         log_entry.soid,
-         log_entry.version,
-         eversion_t(),
-         log_entry.is_delete());
-       return seastar::now();
-      }),
-      crimson::ct_error::enodata::assert_failure{"unexpected enodata"}
-      ).then([] {
-       return seastar::stop_iteration::no;
-      });
-    });
-  }).then([this] {
-    set_missing_may_contain_deletes();
-  });
-}
 #endif
index a9281e1b5f945992b7e532d1ff52f91f7a278fdf..497805c1811bd5d3eef58f71b677bd68c983a6e3 100644 (file)
@@ -943,13 +943,6 @@ public:
                                        ObjectStore::CollectionHandle& ch,
                                        const pg_info_t &info);
 
-#ifdef WITH_SEASTAR
-  seastar::future<> rebuild_missing_set_with_deletes_crimson(
-    crimson::os::FuturizedStore::Shard &store,
-    crimson::os::CollectionRef ch,
-    const pg_info_t &info);
-#endif
-
 protected:
   static void split_by_object(
     mempool::osd_pglog::list<pg_log_entry_t> &entries,