Re: [PATCH 07/39] mds: mark connection down when MDS fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Greg Farnum <greg@xxxxxxxxxxx>



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@xxxxxxxxx (mailto:zheng.z.yan@xxxxxxxxx)>
> 
> So if the MDS restarts and uses the same address, it does not get
> old messages.
> 
> Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx (mailto:zheng.z.yan@xxxxxxxxx)>
> ---
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux