diff options
author | Daniel Black <daniel@linux.vnet.ibm.com> | 2017-11-30 13:37:59 +1100 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-06 09:58:14 +0300 |
commit | 1479273cdbbca57675f3c8295ebcacc768d125d5 (patch) | |
tree | e55c7503961766b0e9601f08d8603f4470ae3ac4 /storage/xtradb/trx | |
parent | e7f4e61f6e013e8879a64dae3ab0370ec137a121 (diff) | |
download | mariadb-git-1479273cdbbca57675f3c8295ebcacc768d125d5.tar.gz |
MDEV-14705: slow innodb startup/shutdown can exceed systemd timeout
Use systemd EXTEND_TIMEOUT_USEC to advise systemd of progress
Move towards progress measures rather than pure time based measures.
Progress reporting at numberious shutdown/startup locations incuding:
* For innodb_fast_shutdown=0 trx_roll_must_shutdown() for rolling back incomplete transactions.
* For merging the change buffer (in srv_shutdown(bool ibuf_merge))
* For purging history, srv_do_purge
Thanks Marko for feedback and suggestions.
Diffstat (limited to 'storage/xtradb/trx')
-rw-r--r-- | storage/xtradb/trx/trx0roll.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/xtradb/trx/trx0roll.cc b/storage/xtradb/trx/trx0roll.cc index 9066e4fac4f..a031217e51d 100644 --- a/storage/xtradb/trx/trx0roll.cc +++ b/storage/xtradb/trx/trx0roll.cc @@ -25,7 +25,7 @@ Created 3/26/1996 Heikki Tuuri *******************************************************/ #include "my_config.h" -#include <my_systemd.h> +#include <my_service_manager.h> #include "trx0roll.h" @@ -752,11 +752,17 @@ UNIV_INTERN void trx_roll_report_progress() n_rows += t->undo_no; } } + + if (n_rows > 0) { + service_manager_extend_timeout( + INNODB_EXTEND_TIMEOUT_INTERVAL, + "To roll back: " ULINTPF " transactions, " + "%llu rows", n_trx, n_rows); + } + ib_logf(IB_LOG_LEVEL_INFO, "To roll back: " ULINTPF " transactions, " "%llu rows", n_trx, n_rows); - sd_notifyf(0, "STATUS=To roll back: " ULINTPF " transactions, " - "%llu rows", n_trx, n_rows); } mutex_exit(&recv_sys->mutex); |