diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-03-09 20:44:56 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-03-09 20:44:56 +0100 |
commit | edde879e50bb2cfc8e3601d4daa2e108363dfeed (patch) | |
tree | 165f48347b1cc457aa05cd15e82da263ba53bba5 | |
parent | b4e63786b987708c8429051be141b87498006c58 (diff) | |
download | mariadb-git-bb-10.5-wlad-15053.tar.gz |
Fix comments in buf_read_pagebb-10.5-wlad-15053
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 20 |
1 files 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); |