MDEV-17481 mariadb service won't shutdown when it's running and the OS datetime updated backwards

__pthread_cond_timedwait() in page cleaner hangs if os time moved
backwards.Workaround could be waking up the page cleaner thread in
logs_empty_and_mark_files_at_shutdown(). But there is possibility that
server could hang when server is running. So InnoDB should wake up page
cleaner thread periodically in srv_master_do_idle_tasks().
parent 2a3bc0b9
......@@ -1936,6 +1936,9 @@ logs_empty_and_mark_files_at_shutdown(void)
"Waiting for page cleaner");
ib::info() << "Waiting for page_cleaner to "
"finish flushing of buffer pool";
/* This is a workaround to avoid the InnoDB hang
when OS datetime changed backwards */
os_event_set(buf_flush_event);
count = 0;
}
}
......
......@@ -2365,6 +2365,10 @@ srv_master_do_idle_tasks(void)
log_checkpoint(true);
MONITOR_INC_TIME_IN_MICRO_SECS(MONITOR_SRV_CHECKPOINT_MICROSECOND,
counter_time);
/* This is a workaround to avoid the InnoDB hang when OS datetime
changed backwards.*/
os_event_set(buf_flush_event);
}
/** Perform shutdown tasks.
......
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