diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-07-17 13:50:55 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-07-17 13:50:55 +1000 |
commit | 6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e (patch) | |
tree | 8650d21b514d2345b3bbab505fc268c0f9fdd0a2 /ctdb/server/ctdb_daemon.c | |
parent | 0964c59dc6706311fd565d91289e922be5e3a864 (diff) | |
download | samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.tar.gz samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.tar.xz samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.zip |
Add two new controls to start and cancel a persistent update.
This allows ctdb to automatically start a new full blown recovery
if a client has started updating the local tdb for a persistent database
but is kill -9ed before it has ensured the update is distributed clusterwide.
(This used to be ctdb commit 1ffccb3e0b3b5bd376c5302304029af393709518)
Diffstat (limited to 'ctdb/server/ctdb_daemon.c')
-rw-r--r-- | ctdb/server/ctdb_daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index c153a97570..aeb0cbde38 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -210,6 +210,12 @@ static int ctdb_client_destructor(struct ctdb_client *client) ctdb_takeover_client_destructor_hook(client); ctdb_reqid_remove(client->ctdb, client->client_id); client->ctdb->statistics.num_clients--; + + if (client->num_persistent_updates != 0) { + DEBUG(DEBUG_ERR,(__location__ " Client disconnecting with %u persistent updates in flight. Starting recovery\n", client->num_persistent_updates)); + client->ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE; + } + return 0; } |