disk space grows by >500% while preparing a backup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
High
|
Alexey Kopytov | ||
2.0 |
Fix Released
|
High
|
Alexey Kopytov | ||
2.1 |
Fix Released
|
High
|
Alexey Kopytov |
Bug Description
when preparing a backup of a database with a large amount (100,000+) of small tables using innodb_
The problem appears to be caused by a call to _fil_io in fil0fil.c to load block_offset 0 of a tablespace that hasn't been loaded yet. Before the tablespace is loaded, space->size is 0 as well. This causes this chunk of code:
if (space->size <= block_offset) {
ulint actual_size;
mutex_
fil_extend_
mutex_
/* should retry? but it may safe for xtrabackup for now. */
}
to think this is a request past the end of the file and to grow the file to the 1MB boundary.
A simple fix is to also test if block_offset != 0 before growing the file. You could also check to see if space->size == 0 (tablespace hasn't been loaded). But that would be unnecessary because if space->size > 0, a request for block_offset 0 would fail the space->size <= block_offset test
Related branches
- Sergei Glushchenko (community): Approve (g2)
-
Diff: 125 lines (+36/-10)6 files modifiedpatches/innodb51.patch (+2/-2)
patches/innodb51_builtin.patch (+2/-2)
patches/innodb55.patch (+2/-2)
patches/xtradb51.patch (+2/-2)
patches/xtradb55.patch (+2/-2)
test/t/bug950334.sh (+26/-0)
- Sergei Glushchenko (community): Approve (g2)
- Registry Administrators: Pending requested
-
Diff: 106 lines (+34/-8)5 files modifiedpatches/innodb51.patch (+2/-2)
patches/innodb55.patch (+2/-2)
patches/xtradb51.patch (+2/-2)
patches/xtradb55.patch (+2/-2)
test/t/bug950334.sh (+26/-0)
tags: | added: contribution |
Thank you for the problem report and the fix!