We may send an MOSDMap as a reply to various requests, including
- a failure report
- a boot message
- a pg_temp message
- an up_thru message
In these cases, send a single MOSDMap message, but limit how big it gets.
All recipients here are osds, which are smart enough to request more maps
based on the MOSDMap::newest_map field.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
mon->send_reply(req, m);
return;
}
- MOSDMap *m = build_incremental(first, osdmap.get_epoch());
+
+ // send some maps. it may not be all of them, but it will get them
+ // started.
+ epoch_t last = MIN(first + g_conf->osd_map_message_max, osdmap.get_epoch());
+ MOSDMap *m = build_incremental(first, last);
m->oldest_map = paxos->get_first_committed();
m->newest_map = osdmap.get_epoch();
mon->send_reply(req, m);