Recover Persistent database DB by DB and not record by record
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 28 Nov 2011 02:56:30 +0000 (13:56 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 29 Nov 2011 23:14:41 +0000 (10:14 +1100)
commit79eb40c7ea594267cae8ad45e8641e23075b9791
tree61304bbb5ee82d7008c5ab5ff0c8ef69803dcb7b
parent2b9b2c874e4f038bd7aefbc5e4e730fcef30c48a
Recover Persistent database DB by DB and not record by record

Add a new tunable that changes the mode how persistent databases are recovered.
RecoveryPDBBySeqNum

When set to 1, persistent databases will be recovered in whole from the node which
has the highest "__db_sequence_number__" record.
This record is managed by samba for those databases where we do persistent writes and have
inter-record relations.
For these databases we do not want the usual "blend records from all nodes based
on individual record RSN" but instead a mode where we pick one instance of the persistent database.

If no node was found with a "__db_sequence_number__" record at all, we fail back to the original "recover records independently based on record RSN".
Some persistent databases do not contain record interrelations and as such does not
contain this special record at all.
include/ctdb_private.h
server/ctdb_recoverd.c
server/ctdb_tunables.c