mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
mon: share random osd map from update_from_paxos, not committed()
This will let us remove committed() entirely. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
9920a168c5
commit
becfce356c
@ -142,7 +142,9 @@ bool OSDMonitor::update_from_paxos()
|
||||
|
||||
send_to_waiting();
|
||||
check_subs();
|
||||
|
||||
|
||||
share_map_with_random_osd();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -295,16 +297,17 @@ void OSDMonitor::encode_pending(bufferlist &bl)
|
||||
|
||||
|
||||
void OSDMonitor::committed()
|
||||
{
|
||||
}
|
||||
|
||||
void OSDMonitor::share_map_with_random_osd()
|
||||
{
|
||||
// tell any osd
|
||||
int r = osdmap.get_any_up_osd();
|
||||
if (r >= 0) {
|
||||
MonSession *s = mon->session_map.get_random_osd_session();
|
||||
if (s) {
|
||||
dout(10) << "committed, telling random " << s->inst << " all about it" << dendl;
|
||||
MOSDMap *m = build_incremental(osdmap.get_epoch() - 1, osdmap.get_epoch()); // whatev, they'll request more if they need it
|
||||
mon->messenger->send_message(m, s->inst);
|
||||
}
|
||||
MonSession *s = mon->session_map.get_random_osd_session();
|
||||
if (s) {
|
||||
dout(10) << "committed, telling random " << s->inst << " all about it" << dendl;
|
||||
MOSDMap *m = build_incremental(osdmap.get_epoch() - 1, osdmap.get_epoch()); // whatev, they'll request more if they need it
|
||||
mon->messenger->send_message(m, s->inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,7 @@ private:
|
||||
void encode_pending(bufferlist &bl);
|
||||
|
||||
void committed();
|
||||
void share_map_with_random_osd();
|
||||
|
||||
void handle_query(PaxosServiceMessage *m);
|
||||
bool preprocess_query(PaxosServiceMessage *m); // true if processed.
|
||||
|
Loading…
Reference in New Issue
Block a user