File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3930,17 +3930,15 @@ std::optional<pg_stat_t> PeeringState::prepare_stats_for_publish(
39303930 // when there is no change in osdmap,
39313931 // update info.stats.reported_epoch by the number of time seconds.
39323932 utime_t cutoff_time = now;
3933- cutoff_time -=
3934- cct->_conf .get_val <int64_t >(" osd_pg_stat_report_interval_max_seconds" );
3933+ cutoff_time -= *osd_pg_stat_report_interval_max_seconds;
39353934 const bool is_time_expired = cutoff_time > info.stats .last_fresh ;
39363935
39373936 // 500 epoch osdmaps are also the minimum number of osdmaps that mon must retain.
39383937 // if info.stats.reported_epoch less than current osdmap epoch exceeds 500 osdmaps,
39393938 // it can be considered that the one reported by pgid is too old and needs to be updated.
39403939 // to facilitate mon trim osdmaps
39413940 epoch_t cutoff_epoch = info.stats .reported_epoch ;
3942- cutoff_epoch +=
3943- cct->_conf .get_val <int64_t >(" osd_pg_stat_report_interval_max_epochs" );
3941+ cutoff_epoch += *osd_pg_stat_report_interval_max_epochs;
39443942 const bool is_epoch_behind = cutoff_epoch < get_osdmap_epoch ();
39453943
39463944 if (pg_stats_publish && pre_publish == *pg_stats_publish &&
Original file line number Diff line number Diff line change 2525#include " OSDMap.h"
2626#include " MissingLoc.h"
2727#include " osd/osd_perf_counters.h"
28+ #include " common/config_cacher.h"
2829#include " common/ostream_temp.h"
2930
3031struct PGPool {
@@ -1391,6 +1392,10 @@ class PeeringState : public MissingLoc::MappingInfo {
13911392
13921393 PGStateHistory state_history;
13931394 CephContext* cct;
1395+ md_config_cacher_t <int64_t > osd_pg_stat_report_interval_max_seconds{
1396+ cct->_conf , " osd_pg_stat_report_interval_max_seconds" };
1397+ md_config_cacher_t <int64_t > osd_pg_stat_report_interval_max_epochs{
1398+ cct->_conf , " osd_pg_stat_report_interval_max_epochs" };
13941399 spg_t spgid;
13951400 DoutPrefixProvider *dpp;
13961401 PeeringListener *pl;
You can’t perform that action at this time.
0 commit comments