Failed to recover from full backup -> CORRUPT LOG RECORD FOUND
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB | Status tracked in 2.4 | |||||
2.4 |
Expired
|
High
|
Unassigned |
Bug Description
Testing branch -> https:/
#### Running:
[root@ps-pxb-5 ~]# while true; do bash test.sh; done
[root@ps-pxb-5 ~]# cat test.sh
#!/bin/bash
echo "drop table if exists db1.sb1" | mysql -u root -pBaku12345# --socket=
echo "create table db1.sb1 as select id,c from db1.sbtest1 where id < 150000;"| mysql -u root -pBaku12345# --socket=
echo "alter table db1.sb1 encryption='Y'" | mysql -u root -pBaku12345# --socket=
echo "create unique index ix on db1.sb1 (id)" | mysql -u root -pBaku12345# --socket=
sleep 1
echo "drop table if exists db2.sb1" | mysql -u root -pBaku12345# --socket=
echo "create table db2.sb1 as select id,c from db2.sbtest1 where id < 150000;" | mysql -u root -pBaku12345# --socket=
echo "alter table db2.sb1 encryption='Y'" | mysql -u root -pBaku12345# --socket=
echo "create unique index ix on db2.sb1 (id)" | mysql -u root -pBaku12345# --socket=
#### Taking backup
[root@ps-pxb-5 bin]# cat run_backup.sh
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
#### Preparing backup
[root@ps-pxb-5 bin]# cat prepare_backup.sh
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
sleep 10
./xtrabackup --defaults-
Result:
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 28656965990
InnoDB: Doing recovery: scanned up to log sequence number 28662208512 (4%)
InnoDB: Doing recovery: scanned up to log sequence number 28667451392 (8%)
InnoDB: Doing recovery: scanned up to log sequence number 28672694272 (12%)
InnoDB: Doing recovery: scanned up to log sequence number 28660897792 (3%)
InnoDB: Doing recovery: scanned up to log sequence number 28666140672 (7%)
InnoDB: Doing recovery: scanned up to log sequence number 28671383552 (11%)
InnoDB: Ignoring data file './db2/sb1.ibd' with space ID 1007, since the redo log references ./db2/sb1.ibd with space ID 1003.
InnoDB: Doing recovery: scanned up to log sequence number 28676626432 (15%)
InnoDB: Doing recovery: scanned up to log sequence number 28681869312 (19%)
InnoDB: Doing recovery: scanned up to log sequence number 28687112192 (23%)
InnoDB: Doing recovery: scanned up to log sequence number 28692355072 (27%)
InnoDB: Doing recovery: scanned up to log sequence number 28697597952 (31%)
InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.
InnoDB: Encryption information in the redo log of space 1008 is invalid
InnoDB: ############### CORRUPT LOG RECORD FOUND ##################
InnoDB: Log record type 30, page 1008:0. Log parsing proceeded successfully up to 28702041009. Previous log record type 4, is multi 1 Recv offset 241501, prev 241494
InnoDB: Hex dump starting 100 bytes before and ending 100 bytes after the corrupted record:
len 207; hex 0000aa010183f00
InnoDB: Set innodb_
InnoDB: Plugin initialization aborted at srv0start.cc[2206] with error Generic error
xtrabackup: innodb_init(): Error occured.
Testing Branch: /github. com/gl- sergei/ percona- xtrabackup/ tree/2. 4-xb-re- encrypt
https:/
The result is similar so putting here as comment.
Creating, inserting, altering:
[root@ps-pxb-5 ~]# cat create_ encrypted_ tables. py
import mysql.connector
cnx = mysql.connector .connect( user='root' , password= 'Baku12345# ',
host= '127.0. 0.1',
database= 'dbtest2' )
cursor = cnx.cursor()
create_stmt = "create table sbtest%s like dbtest.sbtest1"
insert_stmt = "insert into sbtest%s select * from dbtest.sbtest1 where id < 100"
alter_stmt = "alter table sbtest%s encryption='Y'"
for i in range(10000): execute( create_ stmt % i) execute( insert_ stmt % i) execute( alter_stmt % i)
cursor.
print "created table sbtest%s" % i
cursor.
print "Inserted into table sbtest%s" % i
cursor.
print "Ecnryption altered table sbtest%s" %i
cursor.close()
cnx.close()
Rotating master key:
[root@ps-pxb-5 ~]# cat alter_rotate_ keyring. py
import mysql.connector
cnx = mysql.connector .connect( user='root' , password= 'Baku12345# ',
host= '127.0. 0.1',
database= 'dbtest' )
cursor = cnx.cursor()
alter_stmt = "ALTER INSTANCE ROTATE INNODB MASTER KEY"
while(True): execute( alter_stmt)
print "Master key rotated"
cursor.
cursor.close()
cnx.close()
Result of prepare:
[root@ps-pxb-5 full]# /usr/local/ xtrabackup/ bin/xtrabackup --defaults- file=/home/ backup_ dir/full/ backup- my.cnf --prepare --target- dir=/home/ backup_ dir/full xtrabackup/ bin/xtrabackup version 2.4.2 based on MySQL server 5.7.11 Linux (x86_64) (revision id: b43f6fb) dir/full (1370234141) data_home_ dir = . data_file_ path = ibdata1: 12M:autoextend log_group_ home_dir = . log_files_ in_group = 1 log_file_ size = 69074944 data_home_ dir = . data_file_ path = ibdata1: 12M:autoextend log_group_ home_dir = . log_files_ in_group = 1 log_file_ size = 69074944 thread_ fence() is used for memory barrier
/usr/local/
xtrabackup: cd to /home/backup_
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=69074944, start_lsn=
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support available
InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __atomic_
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Number of pools: 1
InnoDB: Using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 13702341...