summaryrefslogtreecommitdiff
path: root/innobase/sync
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-07-12 15:13:18 +0300
committerunknown <marko@hundin.mysql.fi>2004-07-12 15:13:18 +0300
commit7b6fc58ffff432df623d78511eab7e19ddb32f50 (patch)
tree56be07977acfd18f8f7ec1c92b4ee9506f85b471 /innobase/sync
parent45485da7027b5cd65bfdb569fa046f91547c302f (diff)
downloadmariadb-git-7b6fc58ffff432df623d78511eab7e19ddb32f50.tar.gz
InnoDB: Increment the lock wait watchdog timeout during CHECK TABLE
(Bug #2694) innobase/include/srv0srv.h: Add srv_fatal_semaphore_wait_threshold innobase/include/sync0arr.h: Improve comment of sync_array_print_long_waits() innobase/row/row0mysql.c: Lengthen the srv_fatal_semaphore_wait_threshold by 2 hours during CHECK TABLE innobase/srv/srv0srv.c: Add srv_fatal_semaphore_wait_threshold innobase/sync/sync0arr.c: Improve comment of sync_array_print_long_waits(). Replace the fixed timeout of 600 seconds with srv_fatal_semaphore_wait_threshold.
Diffstat (limited to 'innobase/sync')
-rw-r--r--innobase/sync/sync0arr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c
index 944503aa0e2..176aedb6ae3 100644
--- a/innobase/sync/sync0arr.c
+++ b/innobase/sync/sync0arr.c
@@ -890,7 +890,7 @@ sync_arr_wake_threads_if_sema_free(void)
}
/**************************************************************************
-Prints warnings of long semaphore waits to stderr. Currently > 120 sec. */
+Prints warnings of long semaphore waits to stderr. */
void
sync_array_print_long_waits(void)
@@ -900,6 +900,7 @@ sync_array_print_long_waits(void)
ibool old_val;
ibool noticed = FALSE;
ulint i;
+ ulint fatal_timeout = srv_fatal_semaphore_wait_threshold;
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
@@ -914,12 +915,13 @@ sync_array_print_long_waits(void)
}
if (cell->wait_object != NULL
- && difftime(time(NULL), cell->reservation_time) > 600) {
+ && difftime(time(NULL), cell->reservation_time)
+ > fatal_timeout) {
- fputs(
-"InnoDB: Error: semaphore wait has lasted > 600 seconds\n"
+ fprintf(stderr,
+"InnoDB: Error: semaphore wait has lasted > %lu seconds\n"
"InnoDB: We intentionally crash the server, because it appears to be hung.\n",
- stderr);
+ fatal_timeout);
ut_error;
}