Details
-
Bug
-
Status: In Review (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.0, 13.1
-
Can result in hang or crash
Description
There is a potential hang in the function log_t::checkpoint_margin() due to a change that was part of MDEV-37949. The following patch should fix this and catch further failures of the same kind:
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
|
index 5f4a59b41fc..44e62fd1205 100644
|
--- a/storage/innobase/log/log0log.cc
|
+++ b/storage/innobase/log/log0log.cc
|
@@ -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. */ |
I had added the assertion in the MDEV-14992 development branch; that is why saahil flagged this. The fix for that case is to advance lsn by the correct amount, subtracting the 12288-byte checkpoint header from the file size. Also the condition needs to be adjusted: log_t::write_checkpoint() may assign log_sys.resize_log=log_sys.log to indicate that a checkpoint is being written.
Attachments
Issue Links
- is caused by
-
MDEV-37949 Implement innodb_log_archive
-
- Closed
-