From: Sage Weil Date: Mon, 30 Jan 2017 19:57:46 +0000 (-0500) Subject: mon/OSDMonitor: maintain full mapping, synchronously X-Git-Tag: v12.0.1~343^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6af275948440fc0b233ddb7b555e35292972a072;p=ceph.git mon/OSDMonitor: maintain full mapping, synchronously This is temporarily; we'll put this in an async, parallelized thread shortly. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index df21c2d1c404..a83f566cd76f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -354,6 +354,12 @@ void OSDMonitor::on_active() ls.pop_front(); } } + + // FIXME: hacky synchronous blocking mapping update + utime_t start = ceph_clock_now(); + mapping.update(osdmap); + utime_t end = ceph_clock_now(); + dout(10) << __func__ << " updated mapping in " << (end - start) << dendl; } void OSDMonitor::on_shutdown() diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index 2aa6a81bc920..ece88880e6a9 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -30,6 +30,7 @@ using namespace std; #include "msg/Messenger.h" #include "osd/OSDMap.h" +#include "osd/OSDMapMapping.h" #include "PaxosService.h" @@ -113,6 +114,7 @@ class OSDMonitor : public PaxosService { CephContext *cct; public: OSDMap osdmap; + OSDMapMapping mapping; private: // [leader]