[MDEV-11027] InnoDB log recovery is too noisy Created: 2016-10-11 Updated: 2022-10-30 Resolved: 2017-03-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.0 |
| Fix Version/s: | 5.5.55, 10.0.30, 10.1.22, 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jan Lindström (Inactive) | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | upstream | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Sprint: | 5.5.55, 10.2.5-1 | ||||||||||||||||||||||||||||||||||||
| Description |
|
https://bugs.mysql.com/bug.php?id=78844 |
| Comments |
| Comment by Marko Mäkelä [ 2017-02-20 ] | ||||
|
On a related note: When the log files are missing on startup and they have just been created by the very same InnoDB startup run, also in that case InnoDB will display messages about doing crash recovery, even though there is nothing to recover. This is the case at least in 10.2, maybe also 10.0 and 10.1. | ||||
| Comment by Marko Mäkelä [ 2017-02-20 ] | ||||
|
For review, please use this benchmark which is applicable to 10.0 and later:
Display the number of lines in the server error log before and after the fix. Preferrably, display the message lines that were omitted by the patched code. | ||||
| Comment by Marko Mäkelä [ 2017-02-20 ] | ||||
|
If we avoid assigning recv_needed_recovery=true when the redo log files are missing on startup, we will also avoid a costly process of opening all *.ibd files. | ||||
| Comment by Marko Mäkelä [ 2017-02-20 ] | ||||
|
MySQL Bug#78844 was filed against MySQL 5.7, so it would only apply to MariaDB 10.2.2 onwards. | ||||
| Comment by Jan Lindström (Inactive) [ 2017-02-21 ] | ||||
|
Can't use patch on #80788 as we do not have necessary license (provided one is not for MariaDB). Maybe you could invent your own solution for that "bug" on its own MDEV. | ||||
| Comment by Jan Lindström (Inactive) [ 2017-02-21 ] | ||||
|
With attached test case, I could reduce the Doing recovery... outputs from 26 to 1:
| ||||
| Comment by Marko Mäkelä [ 2017-02-21 ] | ||||
|
I filed
I think that as part of this ticket, we should concentrate on the redo log apply. The background rollback can be somewhat noisy too, but it can be fixed separately.
Because the I/O is asynchronous, it is somewhat challenging to provide a meaningful progress measure.
I would not necessarily expose the change buffer merges separately. If that is needed, it could be done separately. We do know in advance how many pages need a change buffer merge, because that information is available in the change buffer bitmap pages. | ||||
| Comment by Simon Mudd [ 2017-03-07 ] | ||||
|
Marko: MySQL Bug#78844 was filed against 5.7 but has been there earlier. It's not "critical" but just horribly noisy and a pain. I've seen thousands of log lines generated during recovery on a busy server which crashed and this level of noise is just pointless. So all it does is making inspecting the log files after a crash to see that the server recovered properly more of a pain. Hope that clarifies. | ||||
| Comment by Marko Mäkelä [ 2017-03-07 ] | ||||
|
sjmudd: Yes, InnoDB recovery has always been noisy, since the very first release (MySQL 3.23). I will try to find a reasonable balance between the size of the diagnostic output and the time elapsed with no apparent progress.
| ||||
| Comment by Marko Mäkelä [ 2017-03-07 ] | ||||
|
sjmudd, would you be happy with rate-limited output like this?
The first and third message would be output unconditionally, while the second and last message would only be output at most once per 15 seconds. The second message would be issued directly after completing redo log file I/O, while the last message would be issued at the end of recv_recover_page(), which is indirectly tied to data file I/O. It would be tricky to add progress reporting to the page writes, so I would avoid it in the first cut. | ||||
| Comment by Marko Mäkelä [ 2017-03-07 ] | ||||
|
bb-10.1-marko | ||||
| Comment by Jan Lindström (Inactive) [ 2017-03-08 ] | ||||
|
ok to push, did you consider 10.0/5.5 ? | ||||
| Comment by Marko Mäkelä [ 2017-03-08 ] | ||||
|
Thanks for the review! I will backport; the risk should be very low. | ||||
| Comment by Marko Mäkelä [ 2017-03-09 ] | ||||
|
Finally, the merge from 10.0 to 10.1 is completed as well. |