From 9a12ba756a69e8fa291779871be534ac7d322591 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 20 Dec 2007 13:28:32 -0800 Subject: [PATCH] make mdsmon be a bit more robust/simple --- .gitignore | 2 ++ src/mds/MDSMap.h | 19 ------------------- src/mon/MDSMonitor.cc | 5 ++++- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 9d2a60dc18f51..57f6a5d080821 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ .depend web/*.html gmon.out +core.* +vgcore.* diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index f93a3bbb6ff27..d97a9928c7c4d 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -29,25 +29,6 @@ using namespace std; /* - beautiful state diagram: - - STOPPED DNE FAILED - / | \ / | | - / | \________ _______/ | | -| v v v v | -| STARTING <--> STANDBY <--> CREATING | -| \ / | -| \____ ____________/ | - \ v v | - \ ACTIVE <-- REJOIN <-- RECONNECT <-- REPLAY - \ | - \ | - \ v - \-- STOPPING - - - new states: - boot --> standby, creating, or starting. diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index db71d66cb991f..8fa1647e47236 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -581,6 +581,9 @@ void MDSMonitor::tick() newstate = MDSMap::STATE_STOPPED; break; + case MDSMap::STATE_STOPPED: + break; + case MDSMap::STATE_REPLAY: case MDSMap::STATE_RESOLVE: case MDSMap::STATE_RECONNECT: @@ -589,7 +592,7 @@ void MDSMonitor::tick() case MDSMap::STATE_STOPPING: newstate = MDSMap::STATE_FAILED; break; - + default: assert(0); } -- 2.39.5