void PGMonitor::post_paxos_update()
{
dout(10) << __func__ << dendl;
- if (mon->osdmon()->osdmap.get_epoch()) {
- send_pg_creates();
+ OSDMap& osdmap = mon->osdmon()->osdmap;
+ if (osdmap.get_epoch()) {
+ if (osdmap.get_num_up_osds() > 0) {
+ assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB);
+ check_subs();
+ }
}
}
propose_pending();
}
-void PGMonitor::send_pg_creates()
-{
- OSDMap& osdmap = mon->osdmon()->osdmap;
- if (osdmap.get_num_up_osds() == 0)
- return;
-
- assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB);
- check_subs();
- return;
-}
-
epoch_t PGMonitor::send_pg_creates(int osd, Connection *con, epoch_t next)
{
dout(30) << __func__ << " " << pg_map.creating_pgs_by_osd_epoch << dendl;
return next;
}
- if (con) {
- con->send_message(m);
- } else {
- assert(mon->osdmon()->osdmap.is_up(osd));
- mon->messenger->send_message(m, mon->osdmon()->osdmap.get_inst(osd));
- }
+ con->send_message(m);
last_sent_pg_create[osd] = ceph_clock_now();
// sub is current through last + 1