diff --git a/src/TODO b/src/TODO index e6a2a1b01fc..be1664e2d94 100644 --- a/src/TODO +++ b/src/TODO @@ -46,7 +46,6 @@ v0.17 - kill mon->osd - notify random osd when a map commits? - how to tell osds to scrub? - - send map on MPGStats, sometimes? - simplify msgr failure model mon<->mon lossless, p2p diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index a795443ee6e..0ac7f237fd9 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -635,6 +635,7 @@ void OSDMonitor::send_to_waiting() if (from <= osdmap.get_epoch()) { while (!p->second.empty()) { send_incremental(p->second.front(), from); + delete p->second.front(); p->second.pop_front(); } } else { @@ -645,6 +646,7 @@ void OSDMonitor::send_to_waiting() } else { while (!p->second.empty()) { send_full(p->second.front()); + delete p->second.front(); p->second.pop_front(); } } @@ -662,6 +664,7 @@ void OSDMonitor::send_latest(PaxosServiceMessage *m, epoch_t start) send_full(m); else send_incremental(m, start); + delete m; } else { dout(5) << "send_latest to " << m->get_orig_source_inst() << " start " << start << " later" << dendl; @@ -674,7 +677,6 @@ void OSDMonitor::send_full(PaxosServiceMessage *m) { dout(5) << "send_full to " << m->get_orig_source_inst() << dendl; mon->send_reply(m, new MOSDMap(mon->monmap->fsid, &osdmap)); - delete m; } MOSDMap *OSDMonitor::build_incremental(epoch_t from) @@ -707,7 +709,6 @@ void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t from) << " to " << req->get_orig_source_inst() << dendl; MOSDMap *m = build_incremental(from); mon->send_reply(req, m); - delete req; } diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index b8053fc6c37..77b3543c77d 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -266,13 +266,12 @@ bool PGMonitor::preprocess_pg_stats(MPGStats *stats) { int from = stats->get_orig_source().num(); - /* // first, just see if they need a new osdmap. but // only if they've had the map for a while. if (stats->had_map_for > 30.0 && + mon->osdmon()->paxos->is_readable() && stats->epoch < mon->osdmon()->osdmap.get_epoch()) - mon->osdmon()->send_latest(stats->get_orig_source_inst(), stats->epoch+1); - */ + mon->osdmon()->send_latest(stats, stats->epoch+1); // any new osd or pg info? if (pg_map.osd_stat.count(from) ||