Commit 1c4a3c52 authored by Aditya A's avatar Aditya A

Bug#13417564 SKIP SLEEP IN SRV_MASTER_THREAD WHEN

             SHUTDOWN IS IN PROGRESS 

PROBLEM
-------
 In the background thread srv_master_thread() we have a 
 a one second delay loop which will continuously monitor
 server activity .If the server is inactive (with out any
 user activity) or in a shutdown state we do some background
 activity like flushing the changes.In the current code
 we are not checking if server is in shutdown state before
 sleeping for one second.

FIX
---
If server is in shutdown state ,then dont go to one second
sleep. 
parent a1ccfcf8
......@@ -2432,7 +2432,7 @@ srv_master_thread(
by x100 (1purge/100msec), to speed up debug scripts
which should wait for purged. */
if (!skip_sleep) {
if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(100000);
}
......@@ -2448,7 +2448,7 @@ srv_master_thread(
} while (n_pages_purged);
} else
#endif /* UNIV_DEBUG */
if (!skip_sleep) {
if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(1000000);
}
......
......@@ -2518,7 +2518,7 @@ srv_master_thread(
by x100 (1purge/100msec), to speed up debug scripts
which should wait for purged. */
if (!skip_sleep) {
if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(100000);
srv_main_sleeps++;
}
......@@ -2535,7 +2535,7 @@ srv_master_thread(
} while (n_pages_purged);
} else
#endif /* UNIV_DEBUG */
if (!skip_sleep) {
if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(1000000);
srv_main_sleeps++;
......
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