From af111b7dd6d22350ade9b1e397c5de1766df4781 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 6 Aug 2019 07:55:10 +0200 Subject: [PATCH] main: fix primary --force on incomplete logfiles --- kernel/sy_old/mars_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 3a3adb7d..bb60433b 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -2824,6 +2824,15 @@ int _get_tolerance(struct mars_rotate *rot) { if (rot->is_log_damaged) return REPLAY_TOLERANCE; + + /* Do not insist on completeness of logfiles when pause-fetch + * is given, important for primary --force when the old primary + * is unreachable (or even dead forever). + */ + if (rot->todo_primary && + !_check_allow(rot->global, rot->parent_path, "connect")) + return REPLAY_TOLERANCE; + return 0; }