persistent_store_timout: do not really time out the trans3_commit control in recovery
authorMichael Adam <obnox@samba.org>
Tue, 22 Feb 2011 21:24:50 +0000 (22:24 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 24 Feb 2011 09:31:59 +0000 (10:31 +0100)
If a recovery was started, then all further processing of the update_record
controls sent by the trans3_commit control and timing them out is disabled.
The recovery should trigger sending the reply for the update record control
when finished.

server/ctdb_persistent.c

index 3f297fa22f8bde1664b730335099f6b1e4d2d6ee..cde3365053c1a8e1240f8754590e2440df4f1c4d 100644 (file)
@@ -88,7 +88,13 @@ static void ctdb_persistent_store_timeout(struct event_context *ev, struct timed
                                         struct timeval t, void *private_data)
 {
        struct ctdb_persistent_state *state = talloc_get_type(private_data, struct ctdb_persistent_state);
-       
+
+       if (state->ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
+               DEBUG(DEBUG_INFO, ("ctdb_persistent_store_timeout: ignoring "
+                                  "timeout during recovery\n"));
+               return;
+       }
+
        ctdb_request_control_reply(state->ctdb, state->c, NULL, CTDB_TRANS2_COMMIT_TIMEOUT, 
                                   "timeout in ctdb_persistent_state");