From: Matan Breizman Date: Thu, 3 Nov 2022 08:59:11 +0000 (+0000) Subject: osd: Remove oldest_stored_osdmap() X-Git-Tag: v16.2.14~69^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=336a3438aff7e59954070d114497bd802661fc2e;p=ceph.git osd: Remove oldest_stored_osdmap() 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 (cherry picked from commit 2541b49927670927fc34acf4af712fdb9f7a5bf7) --- diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 9208cc2d4764..61159ca1ad02 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -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 diff --git a/src/osd/PG.cc b/src/osd/PG.cc index fcd63807274d..1850bd8a6d14 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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; } diff --git a/src/osd/PG.h b/src/osd/PG.h index 408e8114ef51..ba5f1d71fed4 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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; diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 5fa76a7a7b23..2401abda0ab2 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -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 diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index d3ac117b9616..9467b43e90bc 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -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 ==========