diff options
author | Sage Weil <sage@newdream.net> | 2011-11-18 09:56:10 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-11-19 14:30:31 -0800 |
commit | becfce356ce090750e01ffacb7082a7269acae90 (patch) | |
tree | d4c1e8f6f0290b247729dd994fce861cde2c10f0 | |
parent | 9920a168c59807083019c62fdf381434edea12e5 (diff) | |
download | ceph-becfce356ce090750e01ffacb7082a7269acae90.tar.gz |
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>
-rw-r--r-- | src/mon/OSDMonitor.cc | 21 | ||||
-rw-r--r-- | src/mon/OSDMonitor.h | 1 |
2 files changed, 13 insertions, 9 deletions
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; } @@ -296,15 +298,16 @@ 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. |