summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-01-14 20:27:51 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-01-14 20:27:51 +0200
commit8535c260dd399ef07846878536833d9da30b9146 (patch)
treefa565a7f6a7d8217d928d5c68655364e826bdb73
parentc104a01b5028d79f9b434a6e0e6748bee405dc67 (diff)
downloadmariadb-git-8535c260dd399ef07846878536833d9da30b9146.tar.gz
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.
-rw-r--r--storage/innobase/include/mtr0types.h16
-rw-r--r--storage/innobase/log/log0recv.cc6
2 files changed, 4 insertions, 18 deletions
diff --git a/storage/innobase/include/mtr0types.h b/storage/innobase/include/mtr0types.h
index 4a47819e8c8..9e59dc814d3 100644
--- a/storage/innobase/include/mtr0types.h
+++ b/storage/innobase/include/mtr0types.h
@@ -1,7 +1,7 @@
/*****************************************************************************
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
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
in a mini-transaction, the tablespace identifier and page number
fields will be omitted.
-(For some file-oriented records (if same_page=1 for the first records
-of a mini-transaction), we will write tablespace identifier using the
-same 1-to-5-byte encoding. TBD: describe the exact format of
-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 FILE_ records (if same_page=1 for the first record
+of a mini-transaction), we will write a tablespace identifier and
+a page number (always 0) using the same 1-to-5-byte encoding.
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
@@ -304,18 +300,14 @@ enum mfile_type_t
FILE_RENAME = 0xa0,
/** Modify a file. Followed by tablespace ID and the file name. */
FILE_MODIFY = 0xb0,
-#if 1 /* MDEV-14425 FIXME: Remove this! */
/** 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. */
FILE_CHECKPOINT = 0xf0
-#endif
};
-#if 1 /* MDEV-14425 FIXME: Remove this! */
/** Size of a FILE_CHECKPOINT record, including the trailing byte to
terminate the mini-transaction. */
constexpr byte SIZE_OF_FILE_CHECKPOINT= 3/*type,page_id*/ + 8/*LSN*/ + 1;
-#endif
#ifndef UNIV_INNOCHECKSUM
/** Types for the mlock objects to store in the mtr_t::m_memo */
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index fdd9314b9b8..8e79a9b7e87 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -1832,9 +1832,7 @@ eom_found:
#endif
uint32_t space_id= 0, page_no= 0, last_offset= 0;
-#if 1 /* MDEV-14425 FIXME: remove this */
bool got_page_op= false;
-#endif
for (l= log; l < end; l+= rlen)
{
const byte *const recs= l;
@@ -2104,11 +2102,9 @@ same_page:
pages.erase(i);
}
}
-#if 1 /* MDEV-14425 FIXME: this must be in the checkpoint file only! */
else if (rlen)
{
switch (b & 0xf0) {
-# if 1 /* MDEV-14425 FIXME: Remove this! */
case FILE_CHECKPOINT:
if (space_id == 0 && page_no == 0 && rlen == 8)
{
@@ -2139,7 +2135,6 @@ same_page:
}
continue;
}
-# endif
/* fall through */
default:
if (!srv_force_recovery)
@@ -2217,7 +2212,6 @@ same_page:
return true;
}
}
-#endif
else
goto malformed;
}