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
486022ef8f43251258f255ffa15f1a01bc6aa2b7)
Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-8-test): Thu Sep 20 14:05:59 CEST 2018 on sn-devel-144
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);