From fc7f3358437b5b6d27b4e03ee477a9e7406b87e3 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 28 Oct 2013 18:49:51 +1100 Subject: daemon: Change the default recovery method for persistent databases Use sequence numbers to do recovery for persistent databases instead of RSNs. This fixes the problem of registry corruption during recovery. Signed-off-by: Amitay Isaacs (This used to be ctdb commit 56486d1c01cc8ad0e4b8cee7a22429e72e50f03d) --- ctdb/doc/ctdbd.1.xml | 11 +++++++---- ctdb/server/ctdb_tunables.c | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml index 111a8f40ca..75974cf708 100644 --- a/ctdb/doc/ctdbd.1.xml +++ b/ctdb/doc/ctdbd.1.xml @@ -1049,11 +1049,9 @@ RecoverPDBBySeqNum - Default: 0 + Default: 1 - When set to non-zero, this will change how the recovery process for - persistent databases ar performed. By default, when performing a database - recovery, for normal as for persistent databases, recovery is + When set to zero, database recovery for persistent databases is record-by-record and recovery process simply collects the most recent version of every individual record. @@ -1063,6 +1061,11 @@ highest value stored in the record "__db_sequence_number__" is selected and the copy of that nodes database is used as the recovered database. + + By default, recovery of persistent databses is done using + __db_sequence_number__ record. + + FetchCollapse diff --git a/ctdb/server/ctdb_tunables.c b/ctdb/server/ctdb_tunables.c index 5fb4344e2b..4c139ea2a6 100644 --- a/ctdb/server/ctdb_tunables.c +++ b/ctdb/server/ctdb_tunables.c @@ -72,7 +72,7 @@ static const struct { { "StatHistoryInterval", 1, offsetof(struct ctdb_tunable, stat_history_interval), false }, { "DeferredAttachTO", 120, offsetof(struct ctdb_tunable, deferred_attach_timeout), false }, { "AllowClientDBAttach", 1, offsetof(struct ctdb_tunable, allow_client_db_attach), false }, - { "RecoverPDBBySeqNum", 0, offsetof(struct ctdb_tunable, recover_pdb_by_seqnum), false }, + { "RecoverPDBBySeqNum", 1, offsetof(struct ctdb_tunable, recover_pdb_by_seqnum), false }, { "DeferredRebalanceOnNodeAdd", 300, offsetof(struct ctdb_tunable, deferred_rebalance_on_node_add) }, { "FetchCollapse", 1, offsetof(struct ctdb_tunable, fetch_collapse) }, { "HopcountMakeSticky", 50, offsetof(struct ctdb_tunable, hopcount_make_sticky) }, -- cgit