Skip to content

Commit

Permalink
MDEV-13452 Assertion `!recv_no_log_write' failed in log_reserve_and_o…
Browse files Browse the repository at this point in the history
…pen()

The debug flag recv_no_log_write prohibits writes of redo log records for
modifying page data. The debug assertion was failing when fil_names_clear()
was writing the informative MLOG_FILE_NAME and MLOG_CHECKPOINT records
which do not modify any data.

log_reserve_and_open(), log_write_low(): Remove the debug assertion.

log_pad_current_log_block(), mtr_write_log(),
mtr_t::Command::prepare_write(): Add the debug assertion.
  • Loading branch information
dr-m committed Aug 7, 2017
1 parent a33220f commit dcdc1c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions storage/innobase/log/log0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ log_reserve_and_open(

loop:
ut_ad(log_mutex_own());
ut_ad(!recv_no_log_write);

if (log_sys->is_extending) {
log_mutex_exit();
Expand Down Expand Up @@ -416,7 +415,6 @@ log_write_low(

ut_ad(log_mutex_own());
part_loop:
ut_ad(!recv_no_log_write);
/* Calculate a part length */

data_len = (log->buf_free % OS_FILE_LOG_BLOCK_SIZE) + str_len;
Expand Down Expand Up @@ -2291,6 +2289,7 @@ log_pad_current_log_block(void)
ulint i;
lsn_t lsn;

ut_ad(!recv_no_log_write);
/* We retrieve lsn only because otherwise gcc crashed on HP-UX */
lsn = log_reserve_and_open(OS_FILE_LOG_BLOCK_SIZE);

Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/mtr/mtr0mtr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ mtr_write_log(
const ulint len = log->size();
mtr_write_log_t write_log;

ut_ad(!recv_no_log_write);
DBUG_PRINT("ib_log",
(ULINTPF " extra bytes written at " LSN_PF,
len, log_sys->lsn));
Expand Down Expand Up @@ -799,6 +800,8 @@ mtr_t::release_page(const void* ptr, mtr_memo_type_t type)
ulint
mtr_t::Command::prepare_write()
{
ut_ad(!recv_no_log_write);

switch (m_impl->m_log_mode) {
case MTR_LOG_SHORT_INSERTS:
ut_ad(0);
Expand Down

0 comments on commit dcdc1c6

Please sign in to comment.