From ee44c23cd5a9388eaa3e9bee76e778373e09f557 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 23 Feb 2011 17:37:42 +0100 Subject: [PATCH] daemon: correctly end a running trans3_commit if the client disconnects. (This used to be ctdb commit 9e0898db6df52d9bc799dd87bfea8c72d5f70ba0) --- ctdb/server/ctdb_daemon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 362f1cee576..9c650a084f1 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/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;