diff options
author | Vlad Lesin <vlad_lesin@mail.ru> | 2019-02-18 10:14:21 +0300 |
---|---|---|
committer | Vlad Lesin <vlad_lesin@mail.ru> | 2019-02-18 10:14:21 +0300 |
commit | 9bbbaa4c11f7457007bd77365302271c17966c65 (patch) | |
tree | f444d3340a966725ddafacf4167a50c5f2f9bf9b | |
parent | fe0e65dbe28f93bfc677d12be4166415dc1bec5a (diff) | |
download | mariadb-git-bb-10.3.11-xtrabackup_copy_logfile_failed-MDEV-18612.tar.gz |
MDEV-18612: xtrabackup_copy_logfile() failed.bb-10.3.11-xtrabackup_copy_logfile_failed-MDEV-18612
log_t::files::read_log_seg() can return true without changing
*start_lsn, what can cause an error in xtrabackup_copy_logfile() retry logic.
Besides, log_t::files::read_log_seg() can set recv_sys->found_corrupt_log flag,
xtrabackup_copy_logfile() now fails if the flag is set.
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 9ceb2800e73..7e563a750fb 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2728,13 +2728,19 @@ static bool xtrabackup_copy_logfile(bool last = false) lsn_t lsn= start_lsn; for (int retries= 0; retries < 100; retries++) { if (log_sys.log.read_log_seg(&lsn, end_lsn) - || lsn != start_lsn) { + && lsn != start_lsn) { break; } msg("Retrying read of log at LSN=" LSN_PF "\n", lsn); my_sleep(1000); } + if (recv_sys->found_corrupt_log) { + msg("mariabackup: Error: xtrabackup_copy_logfile()" + " found corrupted log.\n"); + exit(EXIT_FAILURE); + } + start_lsn = (lsn == start_lsn) ? 0 : xtrabackup_copy_log(start_lsn, lsn, last); |