Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
Description
1. The option description could use revising
It appears that the new --binlog-directory option in mariabackup only has effect in copy-back mode. It requires at least clarification in help, which now says:
|
knielsen_binlog_in_engine_12.3 6c9155f48bd796cfdf6c1b2f59a03d6205b53ba4 |
--binlog-directory=name
|
Directory containing binlog files, if different from
|
datadir.Has effect only if server is using
|
--binlog-storage-engine=innodb
|
which can be read in many ways, first of all if that it is supposed to point at the location of the original server's binlog files (which of course shouldn't be needed as mariabackup gets the location directly from the server). My second theory was that the option points at the location where the mariabackup should store the binary logs while creating the backup. It also turned out to be not true – I was only able to make it work during copy-back (but then, the part regarding "Has effect only if server is using..." should be irrelevant, as there is no server to speak of at the point of copy-back. I don't have suggestions how the help should be rewritten as I'm still not 100% certain about the option's semantics, but anyway the text should reflect it. Please while doing so also make sure there is a space after the period (if there is still a period in the new text).
2. A relative value works incorrectly
When the relative value is appended to the copy-back's datadir, the slash is missing.
--source include/have_innodb.inc
|
|
|
--let $restart_parameters = --log-bin --binlog-storage-engine=InnoDB
|
--source include/restart_mysqld.inc
|
|
|
create table t (a int) engine=InnoDB; |
flush binary logs; |
insert into t values (1); |
flush binary logs; |
|
|
--exec $XTRABACKUP --backup --target-dir=$MYSQL_TMP_DIR/mbackup --socket=$MASTER_MYSOCK --user=root > $MYSQL_TMP_DIR/mbackup.log 2>&1
|
--exec $XTRABACKUP --prepare --target-dir=$MYSQL_TMP_DIR/mbackup > $MYSQL_TMP_DIR/mprepare.log 2>&1
|
--echo #
|
--echo Running copy-back with --binlog-directory=binlogs --datadir=MYSQL_TMP_DIR/mcopyback
|
--exec $XTRABACKUP --copy-back --target-dir=$MYSQL_TMP_DIR/mbackup --binlog-directory=binlogs --datadir=$MYSQL_TMP_DIR/mcopyback > $MYSQL_TMP_DIR/mcopyback.log 2>&1
|
--echo #
|
--echo # no MYSQL_TMP_DIR/mcopyback/binlogs:
|
--list_files $MYSQL_TMP_DIR/mcopyback/ *
|
--echo #
|
--echo # ...because they are actually in MYSQL_TMP_DIR/mcopybackbinlogs:
|
--list_files $MYSQL_TMP_DIR/mcopybackbinlogs/ *
|
|
|
drop table t; |
#
|
Running copy-back with --binlog-directory=binlogs --datadir=MYSQL_TMP_DIR/mcopyback
|
#
|
# no MYSQL_TMP_DIR/mcopyback/binlogs:
|
aria_log.00000001
|
aria_log_control
|
ib_logfile0
|
ibdata1
|
mariadb_backup_info
|
mtr
|
mysql
|
performance_schema
|
sys
|
test
|
undo001
|
undo002
|
undo003
|
xtrabackup_binlog_pos_innodb
|
#
|
# ...because they are actually in MYSQL_TMP_DIR/mcopybackbinlogs:
|
binlog-000000.ibb
|
binlog-000001.ibb
|
binlog-000002.ibb
|
3. MariaBackup crash
Oddly, while the value of the option doesn't seem to have any effect on the backup mode, the presence of the option does, at least in one case.
| server options | mbackup options | result |
| --binlog-storage-engine=InnoDB | --target-dir=MYSQL_TMP_DIR/mbackup | binlogs copied from the datadir and stored in mbackup |
| --binlog-storage-engine=InnoDB --binlog-directory=server_binlogs | --target-dir=MYSQL_TMP_DIR/mbackup | binlogs copied from server_binlogs and stored in mbackup |
| --binlog-storage-engine=InnoDB --binlog-directory=server_binlogs | --target-dir=MYSQL_TMP_DIR/mbackup --binlog-directory=backup_binlogs | binlogs copied from server_binlogs and stored in mbackup, backup_binlogs is ignored |
| --binlog-storage-engine=InnoDB | --target-dir=MYSQL_TMP_DIR/mbackup --binlog-directory=backup_binlogs | mariabackup crashes |
--source include/have_innodb.inc
|
|
|
--let $restart_parameters = --log-bin --binlog-storage-engine=InnoDB
|
--source include/restart_mysqld.inc
|
|
|
create table t (a int) engine=InnoDB; |
flush binary logs; |
insert into t values (1); |
flush binary logs; |
show binary logs; |
|
|
--echo #
|
--echo # Trying backup mode with --binlog-directory
|
--exec $XTRABACKUP --backup --target-dir=$MYSQL_TMP_DIR/mbackup --socket=$MASTER_MYSOCK --user=root --binlog-directory=backup_binlogs > $MYSQL_TMP_DIR/mbackup.log 2>&1
|
|
|
drop table t; |
#2 <signal handler called>
|
#3 __GI___readdir64 (dirp=0x0) at ../sysdeps/unix/sysv/linux/readdir64.c:37
|
#4 0x000055c143fb0085 in os_file_readdir_next_file (dirname=0x7ffc3a2d1f70 "backup_binlogs", dir=0x0, info=0x7ffc3a2d0e70) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:4172
|
#5 0x000055c14405c216 in foreach_file_in_datadir(char const*, std::function<bool (char const*)>) (dir_path=0x7ffc3a2d1f70 "backup_binlogs", func=...) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/backup_copy.cc:2405
|
#6 0x000055c1440ba606 in common_engine::BackupImpl::copy_engine_binlogs (this=0x55c15cec01d0, binlog_dir=0x7ffc3a2d33fc "backup_binlogs", backup_lsn=92529) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/common_engine.cc:503
|
#7 0x000055c1440bb0b0 in common_engine::Backup::copy_engine_binlogs (this=0x7ffc3a2d2438, binlog_dir=0x7ffc3a2d33fc "backup_binlogs", backup_lsn=92529) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/common_engine.cc:559
|
#8 0x000055c143fd3b4b in BackupStages::do_backup_binlogs (this=0x7ffc3a2d2260) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:5433
|
#9 0x000055c143fd3e59 in BackupStages::stage_end (this=0x7ffc3a2d2260, backup_datasinks=...) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:5469
|
#10 0x000055c143fb63b9 in xtrabackup_backup_func () at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:5727
|
#11 0x000055c143fc7b48 in main_low (argv=0x55c15cbe2b10) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:7939
|
#12 0x000055c143fc65de in main (argc=6, argv=0x7ffc3a2d2898) at /data/bld/preview-12.3/knielsen_binlog_in_engine_12.3-gcov/extra/mariabackup/xtrabackup.cc:7726
|
Attachments
Issue Links
- is caused by
-
MDEV-34705 Improving performance of binary logging by removing the need of syncing it
-
- In Testing
-