Message ID | 1363531902-24909-8-git-send-email-zheng.z.yan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Reviewed-by: Greg Farnum <greg@inktank.com> Software Engineer #42 @ http://inktank.com | http://ceph.com On Sunday, March 17, 2013 at 7:51 AM, Yan, Zheng wrote: > From: "Yan, Zheng" <zheng.z.yan@intel.com (mailto:zheng.z.yan@intel.com)> > > So if the MDS restarts and uses the same address, it does not get > old messages. > > Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com (mailto:zheng.z.yan@intel.com)> > --- > src/mds/MDS.cc (http://MDS.cc) | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/mds/MDS.cc (http://MDS.cc) b/src/mds/MDS.cc (http://MDS.cc) > index 859782a..282fa64 100644 > --- a/src/mds/MDS.cc (http://MDS.cc) > +++ b/src/mds/MDS.cc (http://MDS.cc) > @@ -1046,8 +1046,10 @@ void MDS::handle_mds_map(MMDSMap *m) > oldmap->get_failed_mds_set(oldfailed); > mdsmap->get_failed_mds_set(failed); > for (set<int>::iterator p = failed.begin(); p != failed.end(); ++p) > - if (oldfailed.count(*p) == 0) > + if (oldfailed.count(*p) == 0) { > + messenger->mark_down(oldmap->get_inst(*p).addr); > mdcache->handle_mds_failure(*p); > + } > > // or down then up? > // did their addr/inst change? > @@ -1055,8 +1057,10 @@ void MDS::handle_mds_map(MMDSMap *m) > mdsmap->get_up_mds_set(up); > for (set<int>::iterator p = up.begin(); p != up.end(); ++p) > if (oldmap->have_inst(*p) && > - oldmap->get_inst(*p) != mdsmap->get_inst(*p)) > + oldmap->get_inst(*p) != mdsmap->get_inst(*p)) { > + messenger->mark_down(oldmap->get_inst(*p).addr); > mdcache->handle_mds_failure(*p); > + } > } > if (is_clientreplay() || is_active() || is_stopping()) { > // did anyone stop? > -- > 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 859782a..282fa64 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -1046,8 +1046,10 @@ void MDS::handle_mds_map(MMDSMap *m) oldmap->get_failed_mds_set(oldfailed); mdsmap->get_failed_mds_set(failed); for (set<int>::iterator p = failed.begin(); p != failed.end(); ++p) - if (oldfailed.count(*p) == 0) + if (oldfailed.count(*p) == 0) { + messenger->mark_down(oldmap->get_inst(*p).addr); mdcache->handle_mds_failure(*p); + } // or down then up? // did their addr/inst change? @@ -1055,8 +1057,10 @@ void MDS::handle_mds_map(MMDSMap *m) mdsmap->get_up_mds_set(up); for (set<int>::iterator p = up.begin(); p != up.end(); ++p) if (oldmap->have_inst(*p) && - oldmap->get_inst(*p) != mdsmap->get_inst(*p)) + oldmap->get_inst(*p) != mdsmap->get_inst(*p)) { + messenger->mark_down(oldmap->get_inst(*p).addr); mdcache->handle_mds_failure(*p); + } } if (is_clientreplay() || is_active() || is_stopping()) { // did anyone stop?