]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/: remove PeeringListener::on_info_history_change()
authorSamuel Just <sjust@redhat.com>
Tue, 7 Mar 2023 23:09:22 +0000 (15:09 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 12 Apr 2023 03:39:19 +0000 (20:39 -0700)
The only usage of this method was to notify scrub that the pg history
has been updated during split or peering.  That shouldn't be necessary.
Scrub does not schedule itself prior to activation, and we necessarily
must have an authoritative history by that point.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/pg.h
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PeeringState.h

index c6a806a53a358b84a113e38cf03b1376401835f7..d510a7145f9bab2969a652d25100ba321ec77605 100644 (file)
@@ -159,10 +159,6 @@ public:
     bool need_write_epoch,
     ceph::os::Transaction &t) final;
 
-  void on_info_history_change() final {
-    // Not needed yet -- mainly for scrub scheduling
-  }
-
   /// Need to reschedule next scrub. Assuming no change in role
   void reschedule_scrub() final {
   }
index 35bf0e6409a94c90cad9650839342f5178fe246d..eff053937a1ebde0095fd911967e613b892140ca 100644 (file)
@@ -8766,13 +8766,6 @@ bool OSD::advance_pg(
       double old_max_interval = 0, new_max_interval = 0;
       oldpool->second.opts.get(pool_opts_t::SCRUB_MAX_INTERVAL, &old_max_interval);
       newpool->second.opts.get(pool_opts_t::SCRUB_MAX_INTERVAL, &new_max_interval);
-
-      // Assume if an interval is change from set to unset or vice versa the actual config
-      // is different.  Keep it simple even if it is possible to call resched_all_scrub()
-      // unnecessarily.
-      if (old_min_interval != new_min_interval || old_max_interval != new_max_interval) {
-       pg->on_info_history_change();
-      }
     }
 
     if (new_pg_num && old_pg_num != new_pg_num) {
index 3e8bdc7f21518372ec8f9d2c8b98b2a5c7bd02c9..e7dafda809b6f01191482076ee7bec210e6c0b9a 100644 (file)
@@ -1679,21 +1679,6 @@ std::optional<requested_scrub_t> PG::validate_scrub_mode() const
   return upd_flags;
 }
 
-/*
- * Note: on_info_history_change() is used in those two cases where we're not sure
- * whether the role of the PG was changed, and if so - was this change relayed to the
- * scrub-queue.
- */
-void PG::on_info_history_change()
-{
-  ceph_assert(m_scrubber);
-  dout(20) << fmt::format(
-                 "{} for a {}", __func__,
-                 (is_primary() ? "Primary" : "non-primary"))
-          << dendl;
-  reschedule_scrub();
-}
-
 void PG::reschedule_scrub()
 {
   dout(20) << fmt::format(
index 187760ba539276afea3736c8c789ef6b8beaf149..ccec091e08c0df9d3fce41121285cf9509c5fcb4 100644 (file)
@@ -538,8 +538,6 @@ public:
   void on_pool_change() override;
   virtual void plpg_on_pool_change() = 0;
 
-  void on_info_history_change() override;
-
   void reschedule_scrub() override;
 
   void scrub_requested(scrub_level_t scrub_level, scrub_type_t scrub_type) override;
index a9583af5abc52ebf423f0032b6356cead09fcc92..1ef3141ef47fb8ed8317a812b2cbf5758a3d3963 100644 (file)
@@ -226,7 +226,6 @@ void PeeringState::update_history(const pg_history_t& new_history)
               << info.history.prior_readable_until_ub << ")" << dendl;
     }
   }
-  pl->on_info_history_change();
 }
 
 hobject_t PeeringState::earliest_backfill() const
@@ -667,7 +666,6 @@ void PeeringState::start_peering_interval(
   }
 
   on_new_interval();
-  pl->on_info_history_change();
 
   psdout(1) << "up " << oldup << " -> " << up
            << ", acting " << oldacting << " -> " << acting
@@ -6570,7 +6568,6 @@ boost::statechart::result PeeringState::Stray::react(const MLogRec& logevt)
   if (msg->info.last_backfill == hobject_t()) {
     // restart backfill
     ps->info = msg->info;
-    pl->on_info_history_change();
     ps->dirty_info = true;
     ps->dirty_big_info = true;  // maybe.
 
index a70962072c5ca328117f25ca4d0bcd68868e2bdb..b1c8b0bb40f61e78851dee7255b5ee120754977f 100644 (file)
@@ -279,9 +279,6 @@ public:
       bool need_write_epoch,
       ObjectStore::Transaction &t) = 0;
 
-    /// Notify that info/history changed (generally to update scrub registration)
-    virtual void on_info_history_change() = 0;
-
     /// Need to reschedule next scrub. Assuming no change in role
     virtual void reschedule_scrub() = 0;