1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

ctdb-recoverd: Only start election if node can be leader

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2022-01-07 11:27:06 +11:00 committed by Martin Schwenke
parent 7baadfe27e
commit ac5a3ca063

View File

@ -722,10 +722,12 @@ static void lost_reclock_handler(void *private_data)
struct ctdb_recoverd *rec = talloc_get_type_abort(
private_data, struct ctdb_recoverd);
D_ERR("Recovery lock helper terminated, triggering an election\n");
D_ERR("Recovery lock helper terminated\n");
TALLOC_FREE(rec->recovery_lock_handle);
force_election(rec);
if (this_node_can_be_leader(rec)) {
force_election(rec);
}
}
static bool ctdb_recovery_lock(struct ctdb_recoverd *rec)