[MDEV-28879] Assertion `l->lsn <= log_sys.get_lsn()' failed around recv_recover_page Created: 2022-06-17 Updated: 2022-06-20 Resolved: 2022-06-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.9.2 |
| Fix Version/s: | 10.8.4, 10.9.2, 10.10.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Matthias Leich | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | rr-profile | ||
| Issue Links: |
|
||||||||
| Description |
|
The MTR test encryption.innodb-redo-nokeys fails with
|
| Comments |
| Comment by Matthias Leich [ 2022-06-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-06-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
increased the priority, as it fails in 10.10 now in literally every build | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-06-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The scenario involves recovery in multiple batches:
The first quoted message says "a batch", not "final batch". The l->lsn is not larger than recv_sys.lsn (the recovered LSN), but it is larger than log_sys.lsn, which was last updated at the start of the recovery batch:
For debug builds, the probability of this failure may have been significantly increased by I think that the assertion is documenting a constraint in buf_page_t::flush() or buf_dblwr_t::flush_buffered_writes_completed() that does not actually exist:
The callee would be a no-op during the non-final recovery batch:
This code would be executed by buf_flush_page_cleaner(), invoked from another thread that runs recv_sys_t::apply(), via buf_flush_sync_batch(lsn). Because of the condition, only recovered data pages and no log will be written. It does not really matter that the recovered FIL_PAGE_LSN is ahead of the log_sys.lsn. It suffices to update log_sys.lsn at the end of parsing the log records for the final recovery batch: log_sys.set_recovered_lsn(recv_sys.lsn) will be called at the end of recv_scan_log(true).
Before |