[MDEV-18733] MariaDB slow start after crash recovery Created: 2019-02-25 Updated: 2019-04-09 Resolved: 2019-04-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.24, 10.3.15, 10.4.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance, recovery | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If InnoDB crash recovery was needed, the InnoDB function srv_start() would invoke extra validation:
This time-consuming validation (reading something from every InnoDB data file) should be unnecessary now that RENAME operations inside InnoDB are crash-safe ( The validation can be skipped by setting innodb_force_recovery=1, but that setting will also cause InnoDB crash recovery to turn a blind eye on some problems, such as data files missing, and redo log for missing files being skipped. We should skip the extra validation in MariaDB 10.3 onwards. In MariaDB 10.2 we can skip it unless the compatibility setting innodb_safe_truncate=OFF is active. |
| Comments |
| Comment by Marko Mäkelä [ 2019-04-03 ] |
|
In MariaDB 10.2, we will not read files after crash recovery by default (innodb_safe_truncate=ON). We will also skip opening files whose name starts with #sql- in this case. In MariaDB 10.3 and later versions, there is no innodb_safe_truncate=OFF option; renames inside InnoDB will be transactional and #sql- tables will be dropped automatically on startup. |