[MDEV-20391] Add information about the progress of transaction rollback (and waiting for replication threads to complete) to the error log upon shutdown Created: 2019-08-20 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Replication, Storage Engine - InnoDB |
| Fix Version/s: | 10.4 |
| Type: | Task | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Andrei Elkin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | innodb, logging, replication | ||
| Description |
|
Currently when shutdown happens, innodb_fast_shutdown<>2 snd InnoDB has to roll back some huge transaction, there is no output (but one empty row) until this process is completed. Consider this error log sample:
As you can see, we get nothing but one empty row for more than an hour. Backtrace analysis shows that there is only one active thread doing rollback of a huge transaction, but there is no way to find this out without OS level tools like gdb, perf or bpftrace. How poor DBA should know that something is in progress and there is no hang? Please, add information about the transaction(s) rollback stage (maybe if they work for longer than few seconds at least) like it was done for other stages of normal shutdown above, and consider adding progress reports similar to those that are written upon startup and recovery. On a separate note, in versions with |
| Comments |
| Comment by Andrei Elkin [ 2022-11-07 ] | |||||||
|
ralf.gebhardt, you refer to the 1st part's (of actually two reported issues) related:
which is apparently to marko. I'd rather we untie the two to settle the Dump thread shutdown progress
in a new MDEV. | |||||||
| Comment by Marko Mäkelä [ 2022-11-07 ] | |||||||
|
The InnoDB shutdown could be sped up by setting innodb_fast_shutdown=3 ( | |||||||
| Comment by Andrei Elkin [ 2022-11-07 ] | |||||||
|
valerii, to the
(It doesn't keep moving forward in my simulation though) Please tell us if anything more is needed. | |||||||
| Comment by Valerii Kravchuk [ 2022-11-07 ] | |||||||
|
Is the above I miss some number showing the progress achieved over time.(position remains the same), for DBA to predict when the process may end. I think it may, indeed, be a topic for a separate, new replication-related MDEV. My main request here is for InnoDB rollback progress reporting, hence the Component used. | |||||||
| Comment by Andrei Elkin [ 2022-11-07 ] | |||||||
|
valerii, well, my example constant offset was unnatural caused by my gdb simulation (I just stalled the dump thread). To estimate the progress is still possible with finding the END position of binlog. Sure at the shutdown time one would have to We can improve of course. |