[MDEV-18025] Mariabackup fails to detect corrupted page_compressed=1 tables Created: 2018-12-17 Updated: 2023-04-16 Resolved: 2018-12-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.1.22, 10.3.0, 10.2.9, 10.4.0 |
| Fix Version/s: | 10.4.2, 10.1.38, 10.2.20, 10.3.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | backup, corruption | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Even with the |
| Comments |
| Comment by Marko Mäkelä [ 2018-12-17 ] | ||
|
There already is a test for which we fail to notice corruption:
It will issue messages about 2 tables to the error log, but not about this one:
Before the follow-up fix to MDEV-12112, no messages were emitted about any of these 3 tables to the error log. While fixing this, I would suggest fixing the page trailer validation further: if the page trailer is supposed to contain the least significant bits of FIL_PAGE_LSN but fails to do so, then the page should be rejected as invalid. | ||
| Comment by Marko Mäkelä [ 2018-12-18 ] | ||
|
With the fix, mariabackup is validating each page with buf_page_is_corrupted(). Thanks to that, we should be validating that the LSN at the start and end of the page match. (The end LSN is not present in ROW_FORMAT=COMPRESSED, which is not to be confused with page_compressed=1.) | ||
| Comment by Marko Mäkelä [ 2018-12-20 ] | ||
|
In The problem was uncovered by the tests mariabackup.unencrypted_page_compressed and mariabackup.encrypted_page_compressed that were added as part of this work. It appeared to occur with older zlib only. With the follow-up fixes, this ticket not only implemented the consistency checks that were missing in mariabackup, but also improved the handling of corrupted page_compressed pages in the MariaDB server. |