From 229a0836d24af9697163f994c5b0259e242a4d03 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Sun, 5 Jul 2020 15:13:26 +0200 Subject: [PATCH] main: improve crash recovery for secondary Primary and secondary should use the same correction method. --- kernel/sy_old/mars_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 54a084c2..f50df671 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -4528,7 +4528,8 @@ int make_log_finalize(struct mars_global *global, struct mars_dent *dent) if (rot->replay_code >= TL_REPLAY_RUNNING) rot->replay_code = trans_brick->replay_code; } else if (trans_brick->replay_code < TL_REPLAY_RUNNING || - (rot->todo_primary && + ((rot->todo_primary || + rot->next_relevant_log) && (trans_brick->replay_code == TL_REPLAY_INCOMPLETE || trans_brick->replay_end_pos - trans_brick->replay_current_pos < trans_brick->replay_tolerance))) { MARS_ERR_TO(rot->log_say,