[MDEV-18985] Remove support for XtraDB's changed page bitmap from Mariabackup in 10.2+ Created: 2019-03-20  Updated: 2023-12-10

Status: Confirmed
Project: MariaDB Server
Component/s: mariabackup, Storage Engine - InnoDB
Affects Version/s: 10.4.3, 10.2.22, 10.3.13
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14746 mariabackup doesn't read [mariabackup... Closed
relates to MDEV-14992 BACKUP: in-server backup Open
relates to MDEV-18347 mariabackup doesn't read all server o... Closed
relates to MDEV-18405 Add Mariabackup option to set gtid_sl... Stalled
relates to MDEV-18917 Don't create xtrabackup_binlog_pos_in... Closed
relates to MDEV-18931 Rename Mariabackup's xtrabackup_* fil... Closed
relates to MDEV-19246 Change database and table used for Ma... Closed
relates to MDEV-23695 remove unused xtrabackup code Open
relates to MDEV-19264 Better support MariaDB GTID for Maria... Closed
relates to MDEV-20552 Remove innobackupex mode from Mariaba... Stalled
relates to MDEV-20556 Remove references to "xtrabackup" and... Closed

 Description   

XtraDB supports a feature called "changed page tracking":

XtraDB now tracks the pages that have changes written to them according to the redo log. This information is written out in special changed page bitmap files. This information can be used to speed up incremental backups using Percona XtraBackup by removing the need to scan whole data files to find the changed pages. Changed page tracking is done by a new XtraDB worker thread that reads and parses log records between checkpoints. The tracking is controlled by a new read-only server variable innodb_track_changed_pages.

Bitmap filename format used for changed page tracking is ib_modified_log_<seq>_<startlsn>.xdb. The first number is the sequence number of the bitmap log file and the startlsn number is the starting LSN number of data tracked in that file. Example of the bitmap log files should look like this:

https://www.percona.com/doc/percona-server/5.6/management/changed_page_tracking.html

This was used for incremental backups in Percona XtraBackup:

An incremental backup copies each page whose LSN is newer than the previous incremental or full backup’s LSN. There are two algorithms in use to find the set of such pages to be copied. The first one, available with all the server types and versions, is to check the page LSN directly by reading all the data pages. The second one, available with Percona Server, is to enable the changed page tracking feature on the server, which will note the pages as they are being changed. This information will be then written out in a compact separate so-called bitmap file. The xtrabackup binary will use that file to read only the data pages it needs for the incremental backup, potentially saving many read requests. The latter algorithm is enabled by default if the xtrabackup binary finds the bitmap file. It is possible to specify xtrabackup --incremental-force-scan to read all the pages even if the bitmap data is available.

https://www.percona.com/doc/percona-xtrabackup/2.3/backup_scenarios/incremental_backup.html

MariaDB switched from XtraDB to InnoDB in MariaDB 10.2 and later, so those versions do not support this changed page tracking:

innodb_track_changed_pages

Description: For faster incremental backup with Xtrabackup, XtraDB tracks pages with changes written to them according to the XtraDB redo log and writes the information to special changed page bitmap files. This read-only variable is used for controlling this feature. See also innodb_max_changed_pages and innodb_max_bitmap_file_size. XtraDB only. Added as a deprecated and ignored option in MariaDB 10.2.6 (which uses InnoDB as default instead of XtraDB) to allow for easier upgrades.

https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_track_changed_pages

We should probably remove support for this in Mariabackup in 10.2 and later, if we do not plan to support it. It looks like the code is still there:

https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/changed_page_bitmap.cc#L61


Generated at Thu Feb 08 08:48:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.