diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index eef90a2b85c..c71d502d17f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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); } } diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index 6ba34e1ec86..c7d17459f11 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -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.