recoverd: Remove duplicate code to update flags during recovery
authorMartin Schwenke <martin@meltin.net>
Thu, 14 Nov 2013 03:25:47 +0000 (14:25 +1100)
committerMartin Schwenke <martin@meltin.net>
Mon, 25 Nov 2013 02:39:50 +0000 (13:39 +1100)
This also happens earlier in do_recovery() and the nodemap is not
updated after that, so this update is redundant.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit e58ef9a9bc080e39bebea9e93abcd696fa29ea36)

server/ctdb_recoverd.c

index ffbc2b7cfcb377e35e3a9fb24c57cec93cfbfa90..c879dd5e271e6c818f7bfe352f14b107d628fef2 100644 (file)
@@ -1769,23 +1769,6 @@ static int do_recovery(struct ctdb_recoverd *rec,
 
        DEBUG(DEBUG_NOTICE, (__location__ " Recovery - updated recmaster\n"));
 
-       /*
-         update all nodes to have the same flags that we have
-        */
-       for (i=0;i<nodemap->num;i++) {
-               if (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) {
-                       continue;
-               }
-
-               ret = update_flags_on_all_nodes(ctdb, nodemap, i, nodemap->nodes[i].flags);
-               if (ret != 0) {
-                       DEBUG(DEBUG_ERR, (__location__ " Unable to update flags on all nodes for node %d\n", i));
-                       return -1;
-               }
-       }
-
-       DEBUG(DEBUG_NOTICE, (__location__ " Recovery - updated flags\n"));
-
        /* disable recovery mode */
        ret = set_recovery_mode(ctdb, rec, nodemap, CTDB_RECOVERY_NORMAL);
        if (ret != 0) {