// when there is no change in osdmap,
// update info.stats.reported_epoch by the number of time seconds.
utime_t cutoff_time = now;
- cutoff_time -=
- cct->_conf.get_val<int64_t>("osd_pg_stat_report_interval_max_seconds");
+ cutoff_time -= *osd_pg_stat_report_interval_max_seconds;
const bool is_time_expired = cutoff_time > info.stats.last_fresh;
// 500 epoch osdmaps are also the minimum number of osdmaps that mon must retain.
// it can be considered that the one reported by pgid is too old and needs to be updated.
// to facilitate mon trim osdmaps
epoch_t cutoff_epoch = info.stats.reported_epoch;
- cutoff_epoch +=
- cct->_conf.get_val<int64_t>("osd_pg_stat_report_interval_max_epochs");
+ cutoff_epoch += *osd_pg_stat_report_interval_max_epochs;
const bool is_epoch_behind = cutoff_epoch < get_osdmap_epoch();
if (pg_stats_publish && pre_publish == *pg_stats_publish &&
#include "OSDMap.h"
#include "MissingLoc.h"
#include "osd/osd_perf_counters.h"
+#include "common/config_cacher.h"
#include "common/ostream_temp.h"
struct PGPool {
PGStateHistory state_history;
CephContext* cct;
+ md_config_cacher_t<int64_t> osd_pg_stat_report_interval_max_seconds{
+ cct->_conf, "osd_pg_stat_report_interval_max_seconds" };
+ md_config_cacher_t<int64_t> osd_pg_stat_report_interval_max_epochs{
+ cct->_conf, "osd_pg_stat_report_interval_max_epochs" };
spg_t spgid;
DoutPrefixProvider *dpp;
PeeringListener *pl;