Commit 4d47802f authored by unknown's avatar unknown

sync0arr.c, os0file.h:

  Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait


innobase/include/os0file.h:
  Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait
innobase/sync/sync0arr.c:
  Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait
parent 06b776f9
......@@ -18,6 +18,9 @@ extern ibool os_do_not_call_flush_at_each_write;
extern ibool os_has_said_disk_full;
extern ibool os_aio_print_debug;
extern ulint os_file_n_pending_preads;
extern ulint os_file_n_pending_pwrites;
#ifdef __WIN__
/* We define always WIN_ASYNC_IO, and check at run-time whether
......
......@@ -14,6 +14,7 @@ Created 9/5/1995 Heikki Tuuri
#include "sync0sync.h"
#include "sync0rw.h"
#include "os0sync.h"
#include "os0file.h"
#include "srv0srv.h"
/*
......@@ -940,6 +941,16 @@ sync_array_print_long_waits(void)
"InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:\n");
old_val = srv_print_innodb_monitor;
/* If some crucial semaphore is reserved, then also the InnoDB
Monitor can hang, and we do not get diagnostics. Since in
many cases an InnoDB hang is caused by a pwrite() or a pread()
call hanging inside the operating system, let us print right
now the values of pending calls of these. */
fprintf(stderr,
"InnoDB: Pending preads %lu, pwrites %lu\n", (ulong)os_file_n_pending_preads,
(ulong)os_file_n_pending_pwrites);
srv_print_innodb_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
......
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