1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-09 08:01:34 +03:00

branches/5.1: Port of r2267

This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.

Reviewed by: Heikki
This commit is contained in:
inaam
2008-02-03 19:52:44 +00:00
parent 4670ad0ed0
commit ada26a245f
11 changed files with 393 additions and 289 deletions

View File

@@ -1904,12 +1904,6 @@ loop:
os_thread_sleep(1000000);
/* In case mutex_exit is not a memory barrier, it is
theoretically possible some threads are left waiting though
the semaphore is already released. Wake up those threads: */
sync_arr_wake_threads_if_sema_free();
current_time = time(NULL);
time_elapsed = difftime(current_time, last_monitor_time);
@@ -2106,9 +2100,15 @@ loop:
srv_refresh_innodb_monitor_stats();
}
/* In case mutex_exit is not a memory barrier, it is
theoretically possible some threads are left waiting though
the semaphore is already released. Wake up those threads: */
sync_arr_wake_threads_if_sema_free();
if (sync_array_print_long_waits()) {
fatal_cnt++;
if (fatal_cnt > 5) {
if (fatal_cnt > 10) {
fprintf(stderr,
"InnoDB: Error: semaphore wait has lasted"
@@ -2128,7 +2128,7 @@ loop:
fflush(stderr);
os_thread_sleep(2000000);
os_thread_sleep(1000000);
if (srv_shutdown_state < SRV_SHUTDOWN_CLEANUP) {