From edde879e50bb2cfc8e3601d4daa2e108363dfeed Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 9 Mar 2020 20:44:56 +0100 Subject: Fix comments in buf_read_page --- storage/innobase/buf/buf0rea.cc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 1e2cf139c1d..8dc2fb56e15 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -367,10 +367,13 @@ read_ahead: return(count); } -/** High-level function which reads a page asynchronously from a file to the +/** High-level function which reads a page from a file to the buffer buf_pool if it is not already there. Sets the io_fix flag and sets an exclusive lock on the buffer frame. The flag is cleared and the x-lock -released by the i/o-handler thread. +released by the buf_page_io_complete function. +We use synchronous reads here, because in this case the page is used +right after reading. + @param[in] page_id page id @param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0 @retval DB_SUCCESS if the page was read and is not corrupted, @@ -383,21 +386,10 @@ dberr_t buf_read_page(const page_id_t page_id, ulint zip_size) ulint count; dberr_t err = DB_SUCCESS; - /* - MDEV-15053 TODO : Percona's/MySQL do async read - however, this leads to livelock on compression - corruption scenarios in error handling, when trying to - release corrupted page from LRU, - buf_LRU_free_one_page() loops infinitely, waiting - for page buf_fix count to drop to down to 0. - - Until this fixed, we do synchronous reads with compression - and async with anything else. */ - bool sync = (zip_size != 0); count = buf_read_page_low( - &err, sync, BUF_READ_ANY_PAGE, page_id, zip_size, false); + &err, true, BUF_READ_ANY_PAGE, page_id, zip_size, false); srv_stats.buf_pool_reads.add(count); -- cgit v1.2.1