← Back to team overview

maria-developers team mailing list archive

How to report progress for InnoDB background tasks (esp. at startup/shutdown)?

 

Hi all,

MariaDB Server features a nice-looking interface for reporting progress on
long-running SQL operations:
https://mariadb.com/kb/en/mariadb/progress-reporting/

MySQL 5.7 implemented something similar for reporting progress for ALTER
TABLE…ALGORITHM=INPLACE. I should reimplement that for MariaDB using the
existing MariaDB infrastructure.

I wonder if the same interface could be used for tracking progress on
periodic background tasks that might not be directly related to the
execution of any SQL statements. InnoDB has a number of background tasks,
such as:
* purging unneeded history (removing undo log records and delete-marked
index records)
* rolling back recovered transactions (mainly, if the server was killed)
* index defragmentation, encryption key rotation
* redo log checkpoints (flush all dirty pages up to the checkpoint LSN;
most interesting at shutdown)

The above would need to be monitored also while the server is shutting
down. I understand that at startup, we would probably need a different
progress reporting interfaces for the very first InnoDB task of redo log
apply. Everything else can be done in the background while the server is
accepting connections.

Related to this, I wonder if it is possible or feasible to change the SQL
layer logic so that at shutdown, it will not issue ROLLBACK (as part of
KILL QUERY) to the currently active connections, but let the subsequent
startup do the rollback in the background. This should allow faster
shutdowns and restarts.

Best regards,

Marko
--
DON’T MISS
M|17April 11 - 12, 2017
The Conrad Hotel
New York City
https://m17.mariadb.com/

Marko Mäkelä, Lead Developer InnoDB
MariaDB Corporation

Follow ups