Skip to content

Commit e809982

Browse files
MDEV-37558 Multi-batch recovery discards needed doublewrite pages
Problem: ======= In multi-batch recovery, pages with LSN > recv_sys.scanned_lsn are discarded from doublewrite buffer. Later when reading a corrupted page from disk, corresponding dblwr page is no longer available. This leads to failure of InnoDB recovery. Solution: ========= In buf_dblwr_t::recover(): Replace recv_sys.scanned_lsn with max_lsn when checking if a page's LSN is within the recovery range.
1 parent 979ce5f commit e809982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/innobase/buf/buf0dblwr.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void buf_dblwr_t::recover() noexcept
384384
const page_t *const page= *i;
385385
const uint32_t page_no= page_get_page_no(page);
386386
const lsn_t lsn= mach_read_from_8(page + FIL_PAGE_LSN);
387-
if (recv_sys.parse_start_lsn > lsn || lsn > recv_sys.scanned_lsn)
387+
if (recv_sys.parse_start_lsn > lsn || lsn > max_lsn)
388388
/* Pages written before or after the recovery range are not usable. */
389389
continue;
390390
const uint32_t space_id= page_get_space_id(page);

0 commit comments

Comments
 (0)