[MDEV-15527] page_compressed compressed page partially during import tablespace Created: 2018-03-09 Updated: 2021-07-23 Resolved: 2021-03-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.1.3, 10.2.0, 10.3.0 |
| Fix Version/s: | 10.2.38, 10.3.29, 10.4.19, 10.5.10, 10.6.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | page_compression | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.3.6-1 | ||||||||||||||||
| Description |
|
The CREATE TABLE attribute page_compressed that was introduced in MariaDB 10.1.3 has no effect when innodb_doublewrite=0. This is because the actual compression only takes place within the doublewrite buffer code path. The purpose of the doublewrite buffer is to guarantee crash-safety in the event that InnoDB is killed in the middle of a page write. Because it could become a performance bottleneck for write-heavy workloads, some users may choose to set innodb_doublewrite=0 and take the risk that crash recovery may fail. (The page should be referred to by the redo log, and a log checkpoint should not be made while a page write is still in progress, so the page corruption should be detected at InnoDB startup.) |
| Comments |
| Comment by Marko Mäkelä [ 2018-03-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
To repeat this, run:
And observe the test failure:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2018-03-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The above test case can able to repeat the scenario. String value("maria") found only in root page of clustered index. (3rd page)
The above function call is omitted then t1.ibd doesn't contain maria. Need to check. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-03-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Commit a6ea7b353b5143f5a61fd37c246c49072ba8c421 looks OK to push (with minor changes), but I do not think that it qualifies as a full fix. We should punch holes to the page_compressed files even if the doublewrite buffer is disabled. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2021-03-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Commit a6ea7b353b5143f5a61fd37c246c49072ba8c421 has been pushed as a workaround of
It only writes zero in remaining uncompressed size of the page with zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I posted some comments for the 10.2-based patch. I think that we will also need a 10.5-based version, because the I/O code is quite different there. |