]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Remove oldest_stored_osdmap()
authorMatan Breizman <mbreizma@redhat.com>
Thu, 3 Nov 2022 08:59:11 +0000 (08:59 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 16 May 2023 09:57:59 +0000 (09:57 +0000)
The only usage was for identyfing map gaps on new intervals.
We should use max_oldest_stored_osdmap() instead, since a specific
osd's oldest_map may lag behind.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 2541b49927670927fc34acf4af712fdb9f7a5bf7)

src/crimson/osd/pg.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PeeringState.h

index 9208cc2d47642e50e9ad9d43abd8d6d2f869d890..61159ca1ad027b1c62ef529623a41ffc3b22b08f 100644 (file)
@@ -344,10 +344,6 @@ public:
   void on_active_advmap(const OSDMapRef &osdmap) final {
     // Not needed yet
   }
-  epoch_t oldest_stored_osdmap() final {
-    // TODO
-    return 0;
-  }
 
   epoch_t max_oldest_stored_osdmap() final {
     // TODO
index fcd63807274d88bdd613b7788c349e1a5b995cd9..1850bd8a6d145ead053a0b7f4d9837c4edff5c4d 100644 (file)
@@ -1572,10 +1572,6 @@ void PG::on_new_interval()
   cancel_recovery();
 }
 
-epoch_t PG::oldest_stored_osdmap() {
-  return osd->get_superblock().oldest_map;
-}
-
 epoch_t PG::max_oldest_stored_osdmap() {
   return osd->get_superblock().max_oldest_map;
 }
index 408e8114ef519c26336fea97dcff92da16ff2742..ba5f1d71fed42872cfecac30ff57a6e3a9ab62ab 100644 (file)
@@ -518,7 +518,6 @@ public:
   void clear_publish_stats() override;
   void clear_primary_state() override;
 
-  epoch_t oldest_stored_osdmap() override;
   epoch_t max_oldest_stored_osdmap() override;
   OstreamTemp get_clog_error() override;
   OstreamTemp get_clog_info() override;
index 5fa76a7a7b23c52ab2e1c24792052f7a6b2f07b2..2401abda0ab24166f11868abae4e00afa501a680 100644 (file)
@@ -665,7 +665,7 @@ void PeeringState::start_peering_interval(
     psdout(10) << __func__ << ": check_new_interval output: "
               << debug.str() << dendl;
     if (new_interval) {
-      if (osdmap->get_epoch() == pl->oldest_stored_osdmap() &&
+      if (osdmap->get_epoch() == pl->max_oldest_stored_osdmap() &&
          info.history.last_epoch_clean < osdmap->get_epoch()) {
        psdout(10) << " map gap, clearing past_intervals and faking" << dendl;
        // our information is incomplete and useless; someone else was clean
index d3ac117b96167db376f40b005f096c9571cbc68e..9467b43e90bc997105020592e12c43a34df505ce 100644 (file)
@@ -390,7 +390,6 @@ public:
     // ==================== Std::map notifications ===================
     virtual void on_active_actmap() = 0;
     virtual void on_active_advmap(const OSDMapRef &osdmap) = 0;
-    virtual epoch_t oldest_stored_osdmap() = 0;
     virtual epoch_t max_oldest_stored_osdmap() = 0;
 
     // ============ recovery reservation notifications ==========