Commit ca3aa679 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22577 innodb_fast_shutdown=0 fails to report purge progress

srv_purge_should_exit(): Report progress on slow shutdown
not only to systemd, but also to the error log.
parent 50641db2
...@@ -2516,18 +2516,20 @@ srv_purge_should_exit(ulint n_purged) ...@@ -2516,18 +2516,20 @@ srv_purge_should_exit(ulint n_purged)
return(true); return(true);
} }
/* Slow shutdown was requested. */ /* Slow shutdown was requested. */
if (n_purged) { if (ulint history_size = n_purged ? trx_sys->rseg_history_len : 0) {
#if defined HAVE_SYSTEMD && !defined EMBEDDED_LIBRARY
static time_t progress_time; static time_t progress_time;
time_t now = time(NULL); time_t now = time(NULL);
if (now - progress_time >= 15) { if (now - progress_time >= 15) {
progress_time = now; progress_time = now;
#if defined HAVE_SYSTEMD && !defined EMBEDDED_LIBRARY
service_manager_extend_timeout( service_manager_extend_timeout(
INNODB_EXTEND_TIMEOUT_INTERVAL, INNODB_EXTEND_TIMEOUT_INTERVAL,
"InnoDB: to purge " ULINTPF " transactions", "InnoDB: to purge " ULINTPF " transactions",
trx_sys->rseg_history_len); history_size);
}
#endif #endif
ib::info() << "to purge " << history_size
<< " transactions";
}
/* The previous round still did some work. */ /* The previous round still did some work. */
return(false); return(false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment