mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-recoverd: Add parallel database recovery helper
Parallel database recovery fixes the samba/ctdb deadlock during recovery. Many times samba tries to grab multiple record locks in sequence. Consider a case when samba is already holding a record lock on a database and tries to get a record lock on second database. If the second record is not available on the local node, samba asks ctdb to migrate the record. If recovery occurs at this time (e.g. node becoming inactive), ctdb cannot freeze all the databases since samba is already holding a lock and waiting for the second lock. CTDB can process the second record request only after the recovery is complete, thus causing a deadlock. In parallel database recovery, each database is frozen and recovered independent from each other. So as soon as the second database is recovered, CTDB will resend all the pending migration requests and Samba can get the second lock. Once samba releases both the locks, ctdb can freeze the first database and recover it completing recovery process. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
b04c48d2f5
commit
951431910d
@ -197,6 +197,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_bindir}/ctdb
|
||||
%{_bindir}/ctdb_lock_helper
|
||||
%{_bindir}/ctdb_event_helper
|
||||
%{_bindir}/ctdb_recovery_helper
|
||||
%{_bindir}/smnotify
|
||||
%{_bindir}/ping_pong
|
||||
%{_bindir}/ltdbtool
|
||||
|
1888
ctdb/server/ctdb_recovery_helper.c
Normal file
1888
ctdb/server/ctdb_recovery_helper.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -425,6 +425,12 @@ def build(bld):
|
||||
deps='samba-util ctdb-common-util replace tdb',
|
||||
install_path='${BINDIR}')
|
||||
|
||||
bld.SAMBA_BINARY('ctdb_recovery_helper',
|
||||
source='server/ctdb_recovery_helper.c',
|
||||
deps='''ctdb-client2 ctdb-protocol ctdb-util
|
||||
samba-util replace tdb''',
|
||||
install_path='${BINDIR}')
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-smnotify-h',
|
||||
source='utils/smnotify/smnotify.x',
|
||||
target='utils/smnotify/smnotify.h',
|
||||
|
Loading…
Reference in New Issue
Block a user