recoverd: No need to check if node is recovery master when inactive
authorAmitay Isaacs <amitay@gmail.com>
Thu, 27 Jun 2013 05:46:04 +0000 (15:46 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 2 Jul 2013 07:47:05 +0000 (17:47 +1000)
If a node is stopped or banned, it will cause early return from the
main_loop, so this check is redundent.  The election will called by an
active node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 815ddd3341b7e9db39e05a3a3fcd9a1420f053bc)

Conflicts:
server/ctdb_recoverd.c

server/ctdb_recoverd.c

index 7f295567d0316f17860d99313d9c618a3fa61257..259dfd9f9c2218812864dc44e5e1471255f9ef36 100644 (file)
@@ -3272,15 +3272,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
 
-       /* If the local node is stopped, verify we are not the recmaster 
-          and yield this role if so
-       */
-       if ((nodemap->nodes[pnn].flags & NODE_FLAGS_STOPPED) && (rec->recmaster == pnn)) {
-               DEBUG(DEBUG_ERR,("Local node is STOPPED. Yielding recmaster role\n"));
-               force_election(rec, pnn, nodemap);
-               return;
-       }
-       
        /*
         * if the current recmaster do not have CTDB_CAP_RECMASTER,
         * but we have force an election and try to become the new