mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
mon: send osd map if MPGStats sender has an old map
This commit is contained in:
parent
33cbbd9a72
commit
4c1cc01d05
1
src/TODO
1
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user