[MDEV-33112] innodb_undo_log_truncate=ON is blocking page writes Created: 2023-12-22 Updated: 2024-01-10 Resolved: 2024-01-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4 |
| Fix Version/s: | 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2, 11.4.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | performance | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
The implementation of innodb_undo_log_truncate=ON in trx_purge_truncate_history() is interfering with log checkpoint and page write performance. Before There is a less intrusive, lazy approach: We can actually let the 'garbage' undo log pages remain in the buffer pool, just like we do on DROP TABLE or DROP INDEX or when freeing pages in any operation: Simply, if the newest modification to a page (FIL_PAGE_LSN) is older than the LSN of the latest tablespace rebuild, we will discard the page, just like in For the similar case of shrinking the InnoDB system tablespace ( |
| Comments |
| Comment by Marko Mäkelä [ 2023-12-22 ] |
|
I realized that if we do not acquire exclusive latches on all affected pages before the function fil_truncate_prepare() is invoked, then we would reintroduce the corruption bug In |
| Comment by Matthias Leich [ 2024-01-04 ] |
|
origin/10.6- |
| Comment by Vladislav Lesin [ 2024-01-09 ] |
|
Looks good to me. |
| Comment by Marko Mäkelä [ 2024-01-10 ] |
|
axel had to work around |