Commit 1b558dd4 authored by Vlad Lesin's avatar Vlad Lesin

MDEV-27919 mariabackup --log-copy-interval is measured in millisecondss in...

MDEV-27919 mariabackup --log-copy-interval is measured in millisecondss in 10.5 and in microseconds in 10.6

Multiply polling interval by 1000.
parent f0c52bfe
...@@ -55,6 +55,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA ...@@ -55,6 +55,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include "xtrabackup.h" #include "xtrabackup.h"
#include "common.h" #include "common.h"
#include "backup_copy.h" #include "backup_copy.h"
#include "backup_debug.h"
#include "backup_mysql.h" #include "backup_mysql.h"
#include <btr0btr.h> #include <btr0btr.h>
...@@ -1443,6 +1444,13 @@ bool backup_start(CorruptedPages &corrupted_pages) ...@@ -1443,6 +1444,13 @@ bool backup_start(CorruptedPages &corrupted_pages)
msg("Waiting for log copy thread to read lsn %llu", (ulonglong)server_lsn_after_lock); msg("Waiting for log copy thread to read lsn %llu", (ulonglong)server_lsn_after_lock);
backup_wait_for_lsn(server_lsn_after_lock); backup_wait_for_lsn(server_lsn_after_lock);
DBUG_EXECUTE_FOR_KEY("sleep_after_waiting_for_lsn", {},
{
ulong milliseconds = strtoul(dbug_val, NULL, 10);
msg("sleep_after_waiting_for_lsn");
my_sleep(milliseconds*1000UL);
});
backup_fix_ddl(corrupted_pages); backup_fix_ddl(corrupted_pages);
// There is no need to stop slave thread before coping non-Innodb data when // There is no need to stop slave thread before coping non-Innodb data when
......
...@@ -3098,7 +3098,7 @@ static void log_copying_thread() ...@@ -3098,7 +3098,7 @@ static void log_copying_thread()
(!metadata_to_lsn || metadata_to_lsn > log_copy_scanned_lsn)) (!metadata_to_lsn || metadata_to_lsn > log_copy_scanned_lsn))
{ {
timespec abstime; timespec abstime;
set_timespec_nsec(abstime, 1000ULL * xtrabackup_log_copy_interval); set_timespec_nsec(abstime, 1000000ULL * xtrabackup_log_copy_interval);
mysql_cond_timedwait(&log_copying_stop, &log_sys.mutex, &abstime); mysql_cond_timedwait(&log_copying_stop, &log_sys.mutex, &abstime);
} }
log_copying_running= false; log_copying_running= false;
......
# xtrabackup backup
NOT FOUND /sleep_after_waiting_for_lsn\n(\[\d+\] \d+-\d+-\d+ \d+:\d+:\d+ >> log scanned up to \(\d+\)\n){2}/ in backup.log
--source include/have_debug.inc
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log
--let sleep_after_waiting_for_lsn=250
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --log-copy-interval=500 --dbug=+d,mariabackup_inject_code > $backup_log 2>&1;
--enable_result_log
--let SEARCH_PATTERN=sleep_after_waiting_for_lsn\n(\[\d+\] \d+-\d+-\d+ \d+:\d+:\d+ >> log scanned up to \(\d+\)\n){2}
--let SEARCH_FILE=$backup_log
--source include/search_pattern_in_file.inc
--remove_file $backup_log
rmdir $targetdir;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment