mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Applying InnoDB snapshot
Detailed revision comments: r6633 | marko | 2010-02-10 10:40:55 +0200 (Wed, 10 Feb 2010) | 31 lines branches/zip: Merge revisions 6538:6613 from branches/5.1: ------------------------------------------------------------------------ r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines Changed paths: M /branches/5.1/lock/lock0lock.c branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info incorrect when deadlock detection aborts". Print the correct lock owner when recursive function lock_deadlock_recursive() exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK. rb://217, approved by Marko. ------------------------------------------------------------------------ r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines Changed paths: M /branches/5.1/buf/buf0buf.c M /branches/5.1/buf/buf0rea.c M /branches/5.1/include/buf0rea.h branches/5.1: Fix Bug #38901 InnoDB logs error repeatedly when trying to load page into buffer pool In buf_page_get_gen() if we are unable to read a page (because of corruption or some other reason) we keep on retrying. This fills up error log with millions of entries in no time and we'd eventually run out of disk space. This patch limits the number of attempts that we make (currently set to 100) and after that we abort with a message. rb://241 Approved by: Heikki ------------------------------------------------------------------------
This commit is contained in:
@ -242,6 +242,8 @@ the read requests for the whole area.
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/** Value in microseconds */
|
||||
static const int WAIT_FOR_READ = 5000;
|
||||
/** Number of attemtps made to read in a page in the buffer pool */
|
||||
static const ulint BUF_PAGE_READ_MAX_RETRIES = 100;
|
||||
|
||||
/** The buffer buf_pool of the database */
|
||||
UNIV_INTERN buf_pool_t* buf_pool = NULL;
|
||||
@ -2036,6 +2038,7 @@ buf_page_get_gen(
|
||||
unsigned access_time;
|
||||
ulint fix_type;
|
||||
ibool must_read;
|
||||
ulint retries = 0;
|
||||
|
||||
ut_ad(mtr);
|
||||
ut_ad((rw_latch == RW_S_LATCH)
|
||||
@ -2090,7 +2093,29 @@ loop2:
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
buf_read_page(space, zip_size, offset);
|
||||
if (buf_read_page(space, zip_size, offset)) {
|
||||
retries = 0;
|
||||
} else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
|
||||
++retries;
|
||||
} else {
|
||||
fprintf(stderr, "InnoDB: Error: Unable"
|
||||
" to read tablespace %lu page no"
|
||||
" %lu into the buffer pool after"
|
||||
" %lu attempts\n"
|
||||
"InnoDB: The most probable cause"
|
||||
" of this error may be that the"
|
||||
" table has been corrupted.\n"
|
||||
"InnoDB: You can try to fix this"
|
||||
" problem by using"
|
||||
" innodb_force_recovery.\n"
|
||||
"InnoDB: Please see reference manual"
|
||||
" for more details.\n"
|
||||
"InnoDB: Aborting...\n",
|
||||
space, offset,
|
||||
BUF_PAGE_READ_MAX_RETRIES);
|
||||
|
||||
ut_error;
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
|
||||
ut_a(++buf_dbg_counter % 37 || buf_validate());
|
||||
|
Reference in New Issue
Block a user