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 21:48:23 +0000 (08:48 +1100)
commit502150c764298a9fa8c4d8aa445bf7d85d4ee9dc
tree3d27be71f2eebc2b100e35e249c91142045d0ac9
parent6e96a62494bbb2c7b0682ebf0c2115dd2f44f7af
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