xtrabackup behavior during import changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Unassigned |
Bug Description
On 5.1.54-12.5.188 to perform import we had to run "xtrabackup --prepare --export" against backup once
With percona server built from trunk it is now necessary to perform additional step: before running "xtrabackup --prepare --export" we should run just "xtrabackup --prepare", otherwise import will fail stating that ibd file we want to import is corrupted.
What happens if we run only "xtrabackup --prepare --export" like it was working before:
2011-02-10 21:24:57: xb_export.sh: ===> /root/distr/
2011-02-10 21:24:57: xb_export.sh: ===> xtrabackup --datadir=
xtrabackup: cd to /tmp/xb_
xtrabackup: This target seems to be not prepared yet.
xtrabackup: Temporary instance for recovery is set as followings.
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: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Warning: innodb_
110210 21:24:57 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 38470
110210 21:24:57 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Doing recovery: scanned up to log sequence number 58034 (1 %)
110210 21:24:57 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
110210 21:24:57 Percona XtraDB (http://
xtrabackup: starting shutdown with innodb_
110210 21:24:57 InnoDB: Starting shutdown...
110210 21:24:58 InnoDB: Shutdown completed; log sequence number 58034
xtrabackup Ver 1.5 Rev 203 for 5.1.53 unknown-linux-gnu (x86_64)
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(38470)
xtrabackup: export option is specified.
xtrabackup: export metadata of table 'incremental_
xtrabackup: name=GEN_
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
2011-02-10 21:24:58: xb_export.sh: ===> cp /tmp/xb_
2011-02-10 21:24:58: xb_export.sh: ===> ls -lah /root/distr/
total 140K
drwx------ 2 root root 4.0K Feb 10 21:24 .
drwxr-xr-x 5 root root 4.0K Feb 10 21:24 ..
-rw-rw---- 1 root root 65 Feb 10 21:24 db.opt
-rw-r--r-- 1 root root 16K Feb 10 21:24 test.exp
-rw-rw---- 1 root root 8.4K Feb 10 21:24 test.frm
-rw-r--r-- 1 root root 96K Feb 10 21:24 test.ibd
2011-02-10 21:24:58: xb_export.sh: ===> /root/distr/
InnoDB: free limit of ./incremental_
InnoDB: import: extended import of incremental_
InnoDB: import: 1 indexes are detected.
InnoDB: Progress in %: 16 33 50 66 83 100 done.
110210 21:24:58 InnoDB: Error: file './incremental_
InnoDB: anyway, all not corrupt pages were tried to be converted to salvage.
InnoDB: ##### CAUTION #####
InnoDB: ## The .ibd must cause to crash InnoDB, though re-import would seem to be succeeded.
InnoDB: ## If you don't have knowledge about salvaging data from .ibd, you should not use the file.
InnoDB: ###################
110210 21:24:58 InnoDB: cannot find or open in the database directory the .ibd file of
InnoDB: table `incremental_
InnoDB: in ALTER TABLE ... IMPORT TABLESPACE
ERROR 1030 (HY000) at line 1: Got error -1 from storage engine
2011-02-10 21:24:58: xb_export.sh: ===> mysql failed with exit code 0
Related branches
- Vadim Tkachenko: Approve
- Valentine Gostev (community): Approve (qa)
- Alexey Kopytov (community): Needs Information (source code review)
-
Diff: 332 lines (+36/-34)8 files modifiedinnodb_expand_import.patch (+6/-4)
innodb_extend_slow.patch (+4/-4)
innodb_fast_checksum.patch (+3/-3)
innodb_files_extend.patch (+3/-3)
innodb_fix_misc.patch (+10/-10)
innodb_lru_dump_restore.patch (+1/-1)
innodb_pass_corrupt_table.patch (+4/-4)
innodb_separate_doublewrite.patch (+5/-5)
affects: | percona-xtrabackup → percona-server |
Changed in percona-server: | |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Yasufumi Kinoshita (yasufumi-kinoshita) |
Changed in percona-server: | |
status: | Triaged → Fix Committed |
Changed in percona-server: | |
milestone: | none → 5.1.56-12.7 |
status: | Fix Committed → Fix Released |
The expand_import should accept sys_space( space_id) )
(size_bytes < free_limit_bytes)
for
<1MB (size_bytes < FSP_EXTENT_SIZE * UNIV_PAGE_SIZE)
and
file_per_table .ibd file (!trx_sys_
I will fix later. Please use <1MB file for now.