return osd->get_mnow();
}
+HeartbeatStampsRef PG::get_hb_stamps(int peer)
+{
+ return osd->get_hb_stamps(peer);
+}
+
void PG::rebuild_missing_set_with_deletes(PGLog &pglog)
{
pglog.rebuild_missing_set_with_deletes(
void send_pg_created(pg_t pgid) override;
ceph::signedspan get_mnow() override;
+ HeartbeatStampsRef get_hb_stamps(int peer) override;
void rebuild_missing_set_with_deletes(PGLog &pglog) override;
pg_log.get_missing().may_include_deletes ==
!perform_deletes_during_peering());
+ init_hb_stamps();
+
pl->on_new_interval();
}
}
}
+void PeeringState::init_hb_stamps()
+{
+ if (is_primary()) {
+ // we care about all other osds in the acting set
+ hb_stamps.resize(acting.size() - 1);
+ unsigned i = 0;
+ for (auto p : acting) {
+ if (p == CRUSH_ITEM_NONE || p == get_primary().osd) {
+ continue;
+ }
+ hb_stamps[i++] = pl->get_hb_stamps(p);
+ }
+ hb_stamps.resize(i);
+ } else if (is_replica()) {
+ // we care about just the primary
+ hb_stamps.resize(1);
+ hb_stamps[0] = pl->get_hb_stamps(get_primary().osd);
+ } else {
+ hb_stamps.clear();
+ }
+}
+
+
void PeeringState::clear_recovery_state()
{
async_recovery_targets.clear();
virtual void send_pg_created(pg_t pgid) = 0;
virtual ceph::signedspan get_mnow() = 0;
+ virtual HeartbeatStampsRef get_hb_stamps(int peer) = 0;
// ============ Flush state ==================
/**
/// union of acting, recovery, and backfill targets
set<pg_shard_t> acting_recovery_backfill;
+ vector<HeartbeatStampsRef> hb_stamps;
+
bool send_notify = false; ///< True if a notify needs to be sent to the primary
bool dirty_info = false; ///< small info structu on disk out of date
const vector<int> &newacting,
int new_up_primary,
int new_acting_primary);
+ void init_hb_stamps();
/// Set initial role
void set_role(int r) {