Commit 8535c260 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove FIXME comments that refer to an early MDEV-14425 plan

In MDEV-14425, an early plan was to introduce a separate log file
for file-level records and checkpoint information. The reasoning was
that fil_system.mutex contention would be reduced by not having to
maintain fil_system.named_spaces. The mutex contention was actually
fixed in MDEV-23855 by making some data fields in fil_space_t and
fil_node_t use std::atomic.

Using a single circular log file simplifies recovery and backup.
parent c104a01b
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2021, MariaDB Corporation. Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -115,13 +115,9 @@ If same_page=1 is set in a record that follows a same_page=0 record ...@@ -115,13 +115,9 @@ If same_page=1 is set in a record that follows a same_page=0 record
in a mini-transaction, the tablespace identifier and page number in a mini-transaction, the tablespace identifier and page number
fields will be omitted. fields will be omitted.
(For some file-oriented records (if same_page=1 for the first records For FILE_ records (if same_page=1 for the first record
of a mini-transaction), we will write tablespace identifier using the of a mini-transaction), we will write a tablespace identifier and
same 1-to-5-byte encoding. TBD: describe the exact format of a page number (always 0) using the same 1-to-5-byte encoding.
file-oriented records. With MDEV-14425, we could write file-level log
records to a separate file, not interleaved with page-level redo log
at all. We could reserve the file ib_logfile0 for checkpoint information
and for file-level redo log records.)
For FREE_PAGE or INIT_PAGE, if same_page=1, the record will be treated For FREE_PAGE or INIT_PAGE, if same_page=1, the record will be treated
as corrupted (or reserved for future extension). The type code must as corrupted (or reserved for future extension). The type code must
...@@ -304,18 +300,14 @@ enum mfile_type_t ...@@ -304,18 +300,14 @@ enum mfile_type_t
FILE_RENAME = 0xa0, FILE_RENAME = 0xa0,
/** Modify a file. Followed by tablespace ID and the file name. */ /** Modify a file. Followed by tablespace ID and the file name. */
FILE_MODIFY = 0xb0, FILE_MODIFY = 0xb0,
#if 1 /* MDEV-14425 FIXME: Remove this! */
/** End-of-checkpoint marker. Followed by 2 dummy bytes of page identifier, /** End-of-checkpoint marker. Followed by 2 dummy bytes of page identifier,
8 bytes of LSN, and padded with a NUL; @see SIZE_OF_FILE_CHECKPOINT. */ 8 bytes of LSN, and padded with a NUL; @see SIZE_OF_FILE_CHECKPOINT. */
FILE_CHECKPOINT = 0xf0 FILE_CHECKPOINT = 0xf0
#endif
}; };
#if 1 /* MDEV-14425 FIXME: Remove this! */
/** Size of a FILE_CHECKPOINT record, including the trailing byte to /** Size of a FILE_CHECKPOINT record, including the trailing byte to
terminate the mini-transaction. */ terminate the mini-transaction. */
constexpr byte SIZE_OF_FILE_CHECKPOINT= 3/*type,page_id*/ + 8/*LSN*/ + 1; constexpr byte SIZE_OF_FILE_CHECKPOINT= 3/*type,page_id*/ + 8/*LSN*/ + 1;
#endif
#ifndef UNIV_INNOCHECKSUM #ifndef UNIV_INNOCHECKSUM
/** Types for the mlock objects to store in the mtr_t::m_memo */ /** Types for the mlock objects to store in the mtr_t::m_memo */
......
...@@ -1832,9 +1832,7 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply) ...@@ -1832,9 +1832,7 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
#endif #endif
uint32_t space_id= 0, page_no= 0, last_offset= 0; uint32_t space_id= 0, page_no= 0, last_offset= 0;
#if 1 /* MDEV-14425 FIXME: remove this */
bool got_page_op= false; bool got_page_op= false;
#endif
for (l= log; l < end; l+= rlen) for (l= log; l < end; l+= rlen)
{ {
const byte *const recs= l; const byte *const recs= l;
...@@ -2104,11 +2102,9 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply) ...@@ -2104,11 +2102,9 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
pages.erase(i); pages.erase(i);
} }
} }
#if 1 /* MDEV-14425 FIXME: this must be in the checkpoint file only! */
else if (rlen) else if (rlen)
{ {
switch (b & 0xf0) { switch (b & 0xf0) {
# if 1 /* MDEV-14425 FIXME: Remove this! */
case FILE_CHECKPOINT: case FILE_CHECKPOINT:
if (space_id == 0 && page_no == 0 && rlen == 8) if (space_id == 0 && page_no == 0 && rlen == 8)
{ {
...@@ -2139,7 +2135,6 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply) ...@@ -2139,7 +2135,6 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
} }
continue; continue;
} }
# endif
/* fall through */ /* fall through */
default: default:
if (!srv_force_recovery) if (!srv_force_recovery)
...@@ -2217,7 +2212,6 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply) ...@@ -2217,7 +2212,6 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
return true; return true;
} }
} }
#endif
else else
goto malformed; goto malformed;
} }
......
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