From c596633c74a8b6ca370f069184a3ab02ee87fba1 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 22 Feb 2011 22:44:16 +0100 Subject: [PATCH] persistent: if a node failed to update_record, trigger a recovery and stop processing of the update_record replies in order to let the recovery finish the trans3_commit control. --- server/ctdb_persistent.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/ctdb_persistent.c b/server/ctdb_persistent.c index cde33650..57332908 100644 --- a/server/ctdb_persistent.c +++ b/server/ctdb_persistent.c @@ -65,7 +65,18 @@ static void ctdb_persistent_callback(struct ctdb_context *ctdb, state->status = status; state->errormsg = errormsg; state->num_failed++; + + /* + * If a node failed to complete the update_record control, + * then either a recovery is already running or something + * bad is going on. So trigger a recovery and let the + * recovery finish the transaction, sending back the reply + * for the trans3_commit control to the client. + */ + ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE; + return; } + state->num_pending--; if (state->num_pending == 0) { enum ctdb_trans2_commit_error etype; -- 2.34.1