1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

ctdb-recover: Avoid duplicate deferred attach processing

Deferred attach processing is done unconditionally at this point.  It
is then done again if recovery lock checking is done and completes
successfuly.  If the recovery lock checking fails then it should not
be done at all.

Move this processing so it is done with the early exit when the
recovery lock is not being used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2016-04-28 17:11:22 +10:00 committed by Martin Schwenke
parent f74f2e081e
commit 3e272e081f

View File

@ -901,14 +901,10 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
}
}
/* release any deferred attach calls from clients */
if (recmode == CTDB_RECOVERY_NORMAL) {
ctdb_process_deferred_attach(ctdb);
}
if (ctdb->recovery_lock_file == NULL) {
/* Not using recovery lock file */
ctdb->recovery_mode = recmode;
ctdb->recovery_mode = CTDB_RECOVERY_NORMAL;
ctdb_process_deferred_attach(ctdb);
return 0;
}