persistent_callback: ignore the update-recordreturn code of remote node in recovery
authorMichael Adam <obnox@samba.org>
Tue, 22 Feb 2011 21:24:50 +0000 (22:24 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 7 May 2012 08:56:21 +0000 (10:56 +0200)
If a recovery was started, then all further processing of the update_record
controls sent by the trans3_commit control is disabled. The recovery should
trigger sending the reply for the update record control when finished.
(cherry picked from commit 12cf0619255b12230843cd8bb49cbfdea376ca2f)

Signed-off-by: Michael Adam <obnox@samba.org>
server/ctdb_persistent.c

index d38aa8d9e775539522ba610cfc8c4eadd1ca5863..ee695b1bc2ced4ef1bcbbffd979662f0677526ed 100644 (file)
@@ -53,6 +53,12 @@ static void ctdb_persistent_callback(struct ctdb_context *ctdb,
        struct ctdb_persistent_state *state = talloc_get_type(private_data, 
                                                              struct ctdb_persistent_state);
 
+       if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
+               DEBUG(DEBUG_INFO, ("ctdb_persistent_callback: ignoring reply "
+                                  "during recovery\n"));
+               return;
+       }
+
        if (status != 0) {
                DEBUG(DEBUG_ERR,("ctdb_persistent_callback failed with status %d (%s)\n",
                         status, errormsg));