1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-41359 Potential hang with innodb_log_archive=ON

log_t::checkpoint_margin(): In the target LSN computation, account
for the special case resize_log.m_file==log.m_file which signals
that a checkpoint write is in progress. Assert that the target
checkpoint LSN is sensible.

Fixes up commit 3394a9d114 (MDEV-37949).

Reviewed by: Thirunarayanan Balathandayuthapani
This commit is contained in:
Marko Mäkelä
2026-10-12 10:22:40 +03:00
parent 87e62ca172
commit f01bb8c7ed

View File

@@ -2075,11 +2075,12 @@ ATTRIBUTE_COLD void log_t::checkpoint_margin() noexcept
}
lsn-= max_age;
}
else if (resize_log.is_opened())
lsn+= file_size;
else if (resize_log.is_opened() && resize_log.m_file != log.m_file)
lsn+= capacity();
else
goto done;
ut_ad(lsn <= get_lsn());
mysql_mutex_lock(&buf_pool.flush_list_mutex);
/* We must wait to prevent the tail of the log overwriting the head. */