Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.7(EOL), 10.8(EOL)
Description
As noted in MDEV-14481, there is an unnecessary wait and some dead code in the function recv_sys_t::apply(). Before the function buf_page_get_low() can return, it must acquire an exclusive page latch, and the page must have been read. If the page is being read by another thread, that other thread would already have read-fixed and X-latched the page. Furthermore, before buf_page_read_complete() would return, it would have invoked recv_recover_page() to apply any redo log to the page, before releasing the page latch.
It actually suffices to simply call recv_read_in_area() in order to trigger a transition from page_recv_t::RECV_NOT_PROCESSED to page_recv_t::RECV_BEING_READ for the current block and possibly some following page numbers.
This dead code seems to be present in all InnoDB versions. I think that this is only feasible to fix in 10.5 or later versions, thanks to code simplification that was performed in MDEV-19586, MDEV-21351 and many other tickets.
Attachments
Issue Links
- relates to
-
MDEV-14481 Execute InnoDB crash recovery in the background
- Closed