Commit a6c0a276 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-31362 recv_sys_t::apply(bool): Assertion `!last_batch || recovered_lsn == scanned_lsn' failed

recv_sys_t::apply(): Remove a bogus debug assertion that had been
added in commit f2c17cc9 (MDEV-29911).

It is perfectly normal that when the server was killed in the middle of
writing multiple redo log blocks, the recovery would end such that
recv_sys.scanned_lsn will point to the end of the last complete 512-byte
log block, but recv_sys.recovered_lsn will be less than that.

Also, correct the function comment of recv_sys_t::parse().
parent ea66df2f
......@@ -394,7 +394,7 @@ struct recv_sys_t
bool add(map::iterator it, lsn_t start_lsn, lsn_t lsn,
const byte *l, size_t len);
/** Parse and register one mini-transaction in log_t::FORMAT_10_5.
/** Parse and register mini-transactions in log_t::FORMAT_10_5.
@param checkpoint_lsn the log sequence number of the latest checkpoint
@param store whether to store the records
@param apply whether to apply file-level log records
......
......@@ -2396,7 +2396,7 @@ void recv_sys_t::rewind(const byte *end, const byte *begin) noexcept
pages_it= pages.end();
}
/** Parse and register one mini-transaction in log_t::FORMAT_10_5.
/** Parse and register mini-transactions in log_t::FORMAT_10_5.
@param checkpoint_lsn the log sequence number of the latest checkpoint
@param store whether to store the records
@param apply whether to apply file-level log records
......@@ -2404,7 +2404,7 @@ void recv_sys_t::rewind(const byte *end, const byte *begin) noexcept
or corruption was noticed */
bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
{
restart:
restart:
mysql_mutex_assert_owner(&log_sys.mutex);
mysql_mutex_assert_owner(&mutex);
ut_ad(parse_start_lsn);
......@@ -3626,7 +3626,6 @@ void recv_sys_t::apply(bool last_batch)
recv_no_ibuf_operations = !last_batch ||
srv_operation == SRV_OPERATION_RESTORE ||
srv_operation == SRV_OPERATION_RESTORE_EXPORT;
ut_ad(!last_batch || recovered_lsn == scanned_lsn);
progress_time= time(nullptr);
report_progress();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment