diff options
author | unknown <marko@hundin.mysql.fi> | 2004-10-07 15:58:47 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-10-07 15:58:47 +0300 |
commit | 7949ffc86aa4789a8c3fe886721db974d9914c79 (patch) | |
tree | 6c6c71ac06543487ce1be974ef3195580c76cb53 /innobase/sync | |
parent | 1601646a8846c5246d803411fc349237bfdd998b (diff) | |
download | mariadb-git-7949ffc86aa4789a8c3fe886721db974d9914c79.tar.gz |
InnoDB: tolerate system clock glitches a little better
in the error monitor thread. (Bug #5898)
innobase/include/sync0arr.h:
sync_array_print_long_waits(): return error status
innobase/srv/srv0srv.c:
srv_error_monitor_thread(): Keep track on successive fatal timeouts,
and crash the server only if the timeouts have been exceeded for
several times in succession.
innobase/sync/sync0arr.c:
sync_array_print_long_waits(): return error status
Diffstat (limited to 'innobase/sync')
-rw-r--r-- | innobase/sync/sync0arr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c index 09ddfd1d309..a443d630425 100644 --- a/innobase/sync/sync0arr.c +++ b/innobase/sync/sync0arr.c @@ -889,15 +889,18 @@ sync_arr_wake_threads_if_sema_free(void) /************************************************************************** Prints warnings of long semaphore waits to stderr. */ -void +ibool sync_array_print_long_waits(void) /*=============================*/ + /* out: TRUE if fatal semaphore wait threshold + was exceeded */ { sync_cell_t* cell; ibool old_val; ibool noticed = FALSE; ulint i; ulint fatal_timeout = srv_fatal_semaphore_wait_threshold; + ibool fatal = FALSE; for (i = 0; i < sync_primary_wait_array->n_cells; i++) { @@ -914,13 +917,7 @@ sync_array_print_long_waits(void) if (cell->wait_object != NULL && difftime(time(NULL), cell->reservation_time) > fatal_timeout) { - - fprintf(stderr, -"InnoDB: Error: semaphore wait has lasted > %lu seconds\n" -"InnoDB: We intentionally crash the server, because it appears to be hung.\n", - fatal_timeout); - - ut_error; + fatal = TRUE; } } @@ -948,6 +945,8 @@ sync_array_print_long_waits(void) fprintf(stderr, "InnoDB: ###### Diagnostic info printed to the standard error stream\n"); } + + return(fatal); } /************************************************************************** |