mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix too agressive long semaphore wait output and add guard against introducing
compression failures on insert buffer.
This commit is contained in:
@@ -159,6 +159,7 @@ INSERT INTO global_suppressions VALUES
|
||||
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||
("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"),
|
||||
("InnoDB: Warning: semaphore wait:"),
|
||||
|
||||
/*
|
||||
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
||||
|
@@ -1272,6 +1272,7 @@ page_zip_compress(
|
||||
records. */
|
||||
|
||||
if (srv_simulate_comp_failures
|
||||
&& !dict_index_is_ibuf(index)
|
||||
&& page_get_n_recs(page) >= 2
|
||||
&& ((ulint)(rand() % 100) < srv_simulate_comp_failures)) {
|
||||
|
||||
|
@@ -971,11 +971,39 @@ sync_array_print_long_waits(
|
||||
stderr);
|
||||
sync_array_cell_print(stderr, cell, &reserver);
|
||||
noticed = TRUE;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (diff > fatal_timeout) {
|
||||
fatal = TRUE;
|
||||
}
|
||||
|
||||
if (diff > longest_diff) {
|
||||
longest_diff = diff;
|
||||
*sema = wait_object;
|
||||
*waiter = cell->thread;
|
||||
}
|
||||
}
|
||||
|
||||
/* We found a long semaphore wait, wait all threads that are
|
||||
waiting for a semaphore. */
|
||||
if (noticed) {
|
||||
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
|
||||
void* wait_object;
|
||||
os_thread_id_t reserver=0;
|
||||
|
||||
cell = sync_array_get_nth_cell(sync_primary_wait_array, i);
|
||||
|
||||
wait_object = cell->wait_object;
|
||||
|
||||
if (wait_object == NULL || !cell->waiting) {
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
fputs("InnoDB: Warning: semaphore wait:\n",
|
||||
stderr);
|
||||
sync_array_cell_print(stderr, cell, &reserver);
|
||||
}
|
||||
noticed = TRUE;
|
||||
|
||||
/* Try to output cell information for writer recursive way */
|
||||
while (reserver != 0) {
|
||||
@@ -993,15 +1021,6 @@ sync_array_print_long_waits(
|
||||
reserver = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (diff > fatal_timeout) {
|
||||
fatal = TRUE;
|
||||
}
|
||||
|
||||
if (diff > longest_diff) {
|
||||
longest_diff = diff;
|
||||
*sema = wait_object;
|
||||
*waiter = cell->thread;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1276,6 +1276,7 @@ page_zip_compress(
|
||||
records. */
|
||||
|
||||
if (srv_simulate_comp_failures
|
||||
&& !dict_index_is_ibuf(index)
|
||||
&& page_get_n_recs(page) >= 2
|
||||
&& ((ulint)(rand() % 100) < srv_simulate_comp_failures)) {
|
||||
|
||||
|
@@ -995,11 +995,39 @@ sync_array_print_long_waits(
|
||||
stderr);
|
||||
sync_array_cell_print(stderr, cell, &reserver);
|
||||
noticed = TRUE;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (diff > fatal_timeout) {
|
||||
fatal = TRUE;
|
||||
}
|
||||
|
||||
if (diff > longest_diff) {
|
||||
longest_diff = diff;
|
||||
*sema = wait_object;
|
||||
*waiter = cell->thread;
|
||||
}
|
||||
}
|
||||
|
||||
/* We found a long semaphore wait, wait all threads that are
|
||||
waiting for a semaphore. */
|
||||
if (noticed) {
|
||||
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
|
||||
void* wait_object;
|
||||
os_thread_id_t reserver=0;
|
||||
|
||||
cell = sync_array_get_nth_cell(sync_primary_wait_array, i);
|
||||
|
||||
wait_object = cell->wait_object;
|
||||
|
||||
if (wait_object == NULL || !cell->waiting) {
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
fputs("InnoDB: Warning: semaphore wait:\n",
|
||||
stderr);
|
||||
sync_array_cell_print(stderr, cell, &reserver);
|
||||
}
|
||||
noticed = TRUE;
|
||||
|
||||
/* Try to output cell information for writer recursive way */
|
||||
while (reserver != 0) {
|
||||
@@ -1017,15 +1045,6 @@ sync_array_print_long_waits(
|
||||
reserver = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (diff > fatal_timeout) {
|
||||
fatal = TRUE;
|
||||
}
|
||||
|
||||
if (diff > longest_diff) {
|
||||
longest_diff = diff;
|
||||
*sema = wait_object;
|
||||
*waiter = cell->thread;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user