From: John Spray Date: Mon, 27 Jul 2015 20:34:32 +0000 (+0100) Subject: mds: fix standby handling in map X-Git-Tag: v9.1.0~406^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37370c7f563f7a42df82cb5fd46a2b93fe5622d6;p=ceph.git mds: fix standby handling in map I broke this by taking the state from the old mdsmap instead of the new one. Signed-off-by: John Spray --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index e0c317e8cf7d..5093f594738f 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -815,15 +815,16 @@ void MDSDaemon::handle_mds_map(MMDSMap *m) return; } + entity_addr_t addr; + // keep old map, for a moment MDSMap *oldmap = mdsmap; - const MDSMap::DaemonState new_state = mdsmap->get_state_gid(mds_gid_t(monc->get_global_id())); - const int incarnation = mdsmap->get_inc_gid(mds_gid_t(monc->get_global_id())); - entity_addr_t addr; // decode and process mdsmap = new MDSMap; mdsmap->decode(m->get_encoded()); + const MDSMap::DaemonState new_state = mdsmap->get_state_gid(mds_gid_t(monc->get_global_id())); + const int incarnation = mdsmap->get_inc_gid(mds_gid_t(monc->get_global_id())); monc->sub_got("mdsmap", mdsmap->get_epoch());