mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ctdb-recoverd: Set recovery lock handle at start of attempt
This allows the attempt to be cancelled if an election is lost and an
unlock is done before the attempt is completed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Sep 18 02:18:30 CEST 2018 on sn-devel-144
(cherry picked from commit 486022ef8f
)
Autobuild-User(v4-9-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-9-test): Thu Sep 20 12:35:23 CEST 2018 on sn-devel-144
This commit is contained in:
parent
e6bcccbca2
commit
10d1b4d9a2
@ -956,17 +956,18 @@ static bool ctdb_recovery_lock(struct ctdb_recoverd *rec)
|
||||
return false;
|
||||
}
|
||||
|
||||
rec->recovery_lock_handle = s;
|
||||
s->h = h;
|
||||
|
||||
while (! s->done) {
|
||||
tevent_loop_once(ctdb->ev);
|
||||
}
|
||||
|
||||
if (! s->locked) {
|
||||
talloc_free(s);
|
||||
TALLOC_FREE(rec->recovery_lock_handle);
|
||||
return false;
|
||||
}
|
||||
|
||||
rec->recovery_lock_handle = s;
|
||||
s->h = h;
|
||||
ctdb_ctrl_report_recd_lock_latency(ctdb,
|
||||
CONTROL_TIMEOUT(),
|
||||
s->latency);
|
||||
|
Loading…
Reference in New Issue
Block a user