Commit 40c7778e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-12814 mariabackup : don't try io throttling in copy-back

Throttling only works with when creating backup.  Attempt to use it with
 --copy-back results in crash, since throttle events are not initialized.
Thus, ignore throttling unless --backup is given.
parent f302a3cf
...@@ -2169,7 +2169,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info) ...@@ -2169,7 +2169,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
void void
xtrabackup_io_throttling(void) xtrabackup_io_throttling(void)
{ {
if (xtrabackup_throttle && (io_ticket--) < 0) { if (xtrabackup_backup && xtrabackup_throttle && (io_ticket--) < 0) {
os_event_reset(wait_throttle); os_event_reset(wait_throttle);
os_event_wait(wait_throttle); os_event_wait(wait_throttle);
} }
......
...@@ -7,7 +7,7 @@ shutdown_server; ...@@ -7,7 +7,7 @@ shutdown_server;
echo # remove datadir; echo # remove datadir;
rmdir $_datadir; rmdir $_datadir;
echo # xtrabackup move back; echo # xtrabackup move back;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2 --throttle=1;
echo # restart server; echo # restart server;
exec echo "restart" > $_expect_file_name; exec echo "restart" > $_expect_file_name;
enable_reconnect; enable_reconnect;
......
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