• Marko Mäkelä's avatar
    MDEV-28879 Assertion `l->lsn <= log_sys.get_lsn()' failed around recv_recover_page · 325e6aa7
    Marko Mäkelä authored
    recv_recover_page(): Correct a debug assertion to refer to recv_sys.lsn,
    which may be ahead of log_sys.lsn during non-final recovery batches.
    In commit 685d958e (MDEV-14425)
    when some redundant LSN fields were removed,
    log_sys.log.scanned_lsn had been replaced with a reference to
    log_sys.lsn instead of the more appropriate recv_sys.lsn.
    
    recv_scan_log(): Remove a redundant call to log_sys.set_recovered_lsn().
    It suffices to adjust the log_sys.lsn after parsing (and before starting
    to apply) records for the last batch.
    
    Note: Normally, log_sys.lsn must be the latest log sequence number.
    Before the final recovery batch, this may be safely violated, because
    log_write_up_to() will be a no-op. That function will be invoked by the
    buf_flush_page_cleaner thread to initiate writes of recovered pages.
    325e6aa7
log0recv.cc 132 KB