From c562874b9d5caff40f79b2857db8e9a5eb196627 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 23 Feb 2011 17:37:42 +0100 Subject: [PATCH 1/1] daemon: correctly end a running trans3_commit if the client disconnects. --- server/ctdb_daemon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c index 362f1cee..9c650a08 100644 --- a/server/ctdb_daemon.c +++ b/server/ctdb_daemon.c @@ -225,7 +225,16 @@ static int ctdb_client_destructor(struct ctdb_client *client) DEBUG(DEBUG_ERR, (__location__ " client exit while transaction " "commit active. Forcing recovery.\n")); client->ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE; + + /* legacy trans2 transaction state: */ ctdb_db->transaction_active = false; + + /* + * trans3 transaction state: + * + * The destructor sets the pointer to NULL. + */ + talloc_free(ctdb_db->persistent_state); } return 0; -- 2.34.1