Merge lp:~laurynas-biveinis/percona-xtrabackup/bug1049174-2.0 into lp:percona-xtrabackup/2.0
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 469 |
Proposed branch: | lp:~laurynas-biveinis/percona-xtrabackup/bug1049174-2.0 |
Merge into: | lp:percona-xtrabackup/2.0 |
Diff against target: |
304 lines (+139/-56) 1 file modified
src/xtrabackup.c (+139/-56) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-xtrabackup/bug1049174-2.0 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Review via email: mp+124411@code.launchpad.net |
Description of the change
Fix handling of compressed tablespaces, created between the last full
or incremental and the next incremental backup.
Bugs fixed:
bug 1049174 (Redundant zip_size handling at delta application
time),
bug 1044398 (Handling of compressed tablespaces with compressed page
size == server page size broken),
bug 1043762 (Incremental backups may take up to 5x more space after
the fix for bug #1022562).
In order not to include the first 64KB of a tablespace unconditionally
in every delta (bug 1043762), we need to be able to create a
tablespace on disk without relying on the presence of the first pages
of a newly-created tablespace in the delta. These pages, in the
absence of any later writes to them, get a modification LSN of 0,
causing them to be omitted from the delta.
Thus we create new tablespaces from scratch by a new function
xb_delta_
fil_create_
to work, it needs a tablespace flags value, and a default value of 0
(which assumes a regular uncompressed tablespace) will cause asserts
in trying to apply log records to it later, if the tablespace is
actually compressed and its header page was not overwritten by the
delta due to reasons above. Thus, we need the actual flags value.
For this purpose we extend the incremental backup delta metadata with
a new field zip_size. On backup preperation the presence of this flag
is optional, to keep the ability to restore from the old backups and
because its value is required only in the case describe above (a new
compressed tablespace created between the backups, no log records
touching its 1st page).
Always pass zero to fil_space_create() instead of the tablespace flags
in xb_delta_
fil_space_create() and xb_delta_
flags for all XtraBackup flavours by conditionally defining the
required constants, to minimize the conditionally-
there was no zip_size in the metadata, assume flags to be zero.
Revert the changes in xtrabackup_
that is, do not store the first 64KB of every tablespace
unconditionally.
In xtrabackup_
equal to page_size whenever page_size < UNIV_PAGE_SIZE, fixing bug
10443398.
No testsuite changes, as this is non-functional case. The regular
incremental compressed backups are tested by the
xb_incremental_
tablespace that does not have its 1st page in the delta is tested by
bug1028949 test.
Jenkins: http://
Issue #16274