From 37370c7f563f7a42df82cb5fd46a2b93fe5622d6 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 27 Jul 2015 21:34:32 +0100 Subject: [PATCH] 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 --- src/mds/MDSDaemon.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index e0c317e8cf7..5093f594738 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()); -- 2.47.3