MySQL 8.0.39
Source Code Documentation
|
Redo log constant values. More...
Go to the source code of this file.
Variables | |
constexpr size_t | LOG_BUFFER_ALIGNMENT = OS_FILE_LOG_BLOCK_SIZE |
Align the log buffer (log_t::buf) to this size. More... | |
constexpr size_t | LOG_WRITE_AHEAD_BUFFER_ALIGNMENT |
Align the log write-ahead buffer (log_t::write_ahead_buf) to this size. More... | |
Log constants related to the log file i-nodes. | |
constexpr const char *const | LOG_DIRECTORY_NAME = "#innodb_redo" |
Name of subdirectory which contains redo log files. More... | |
constexpr const char *const | LOG_FILE_BASE_NAME = "#ib_redo" |
Prefix of log file name in the current redo format. More... | |
constexpr uint32_t | LOG_FILE_NAME_MAX_LENGTH = 8 + 22 |
Maximum length of log file name, computed as: base name length(8) More... | |
constexpr size_t | LOG_N_FILES = 32 |
Targeted number of log files. More... | |
constexpr double | LOG_N_FILES_MAX_DOWNSIZE_RATIO = 1.0 / 8 |
Determines maximum downsize for maximum redo file size during resize. More... | |
constexpr os_offset_t | LOG_FILE_MIN_SIZE = 64 * 1024 |
Minimum size of single log file, expressed in bytes. More... | |
constexpr os_offset_t | LOG_CAPACITY_MIN = 8 * 1024 * 1024 |
Minimum allowed value for innodb_redo_log_capacity. More... | |
constexpr os_offset_t | LOG_CAPACITY_MAX = 512ull * 1024 * 1024 * 1024 |
Maximum allowed value for innodb_redo_log_capacity. More... | |
constexpr os_offset_t | LOG_FILE_MAX_SIZE = LOG_CAPACITY_MAX / LOG_N_FILES |
Maximum size of a log file, expressed in bytes. More... | |
constexpr Log_file_id | LOG_FIRST_FILE_ID = 0 |
Id of the first redo log file (assigned to the first log file when new data directory is being initialized). More... | |
constexpr size_t | LOG_MAX_OPEN_FILES = 2 |
Maximum number of handles for opened redo log files (in parallel). More... | |
Log constants related to the log margins. | |
Ensure, that 64 bits are enough to represent lsn values, when 63 bits are used to represent sn values. It is enough to ensure that lsn < 2*sn, and that is guaranteed if the overhead enumerated in lsn sequence is not bigger than number of actual data bytes. | |
constexpr os_offset_t | LOG_EXTRA_SAFETY_MARGIN = 2 * UNIV_PAGE_SIZE_MAX |
Extra safety margin in the redo capacity, never ever used ! More... | |
constexpr double | LOG_NEXT_FILE_EARLIER_MARGIN = 10 |
Margin which is used ahead of log.write_lsn to create unused files earlier than the log.write_lsn reaches the m_end_lsn of the log.m_current_file. More... | |
constexpr double | LOG_EXTRA_WRITER_MARGIN_PCT = 5 |
Extra margin, reserved in the redo capacity for the log writer thread. More... | |
constexpr double | LOG_EXTRA_CONC_MARGIN_PCT = 5 |
Extra margin, reserved in the redo capacity for the concurrency margin. More... | |
constexpr double | LOG_CONCCURENCY_MARGIN_MAX_PCT = 50 |
The maximum limit for concurrency_margin expressed as percentage of the redo capacity available for user threads (soft capacity). More... | |
constexpr size_t | LOG_BACKGROUND_THREADS_USING_RW_MTRS = 10 |
Maximum number of concurrent background threads, that could be using mini transactions which are not read-only (producing redo log records). More... | |
constexpr uint32_t | LOG_CHECKPOINT_FREE_PER_THREAD = 4 |
Per thread margin for the free space in the log, before a new query step which modifies the database, is started. More... | |
constexpr uint32_t | LOG_FILES_DUMMY_INTAKE_SIZE = 4 * 1024 |
Number of bytes that might be generated by log_files_governor thread to fill up the current log file faster. More... | |
constexpr uint32_t | LOG_AGGRESSIVE_CHECKPOINT_RATIO_MIN = 32 |
Controls when the aggressive checkpointing should be started, with regards to the free space in the redo log. More... | |
constexpr uint32_t | LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MAX = 16 |
Controls when the maximum speed of adaptive flushing of modified pages is reached (with regards to free space in the redo log). More... | |
constexpr uint32_t | LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MIN = 8 |
Controls when the speed of adaptive flushing of modified pages starts to increase. More... | |
Log constants related to the system variables. | |
constexpr ulint | INNODB_LOG_WRITE_MAX_SIZE_DEFAULT = 4096 |
Default value of innodb_log_write_max_size (in bytes). More... | |
constexpr ulong | INNODB_LOG_CHECKPOINT_EVERY_DEFAULT = 1000 |
Default value of innodb_log_checkpointer_every (in milliseconds). More... | |
constexpr ulong | INNODB_LOG_WRITER_SPIN_DELAY_DEFAULT = 250000 |
Default value of innodb_log_writer_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_WRITER_TIMEOUT_DEFAULT = 10 |
Default value of innodb_log_writer_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_SPIN_CPU_ABS_LWM_DEFAULT = 80 |
Default value of innodb_log_spin_cpu_abs_lwm. More... | |
constexpr uint | INNODB_LOG_SPIN_CPU_PCT_HWM_DEFAULT = 50 |
Default value of innodb_log_spin_cpu_pct_hwm. More... | |
constexpr ulong | INNODB_LOG_WAIT_FOR_WRITE_SPIN_DELAY_DEFAULT = 25000 |
Default value of innodb_log_wait_for_write_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_WAIT_FOR_WRITE_TIMEOUT_DEFAULT = 1000 |
Default value of innodb_log_wait_for_write_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_WAIT_FOR_FLUSH_SPIN_DELAY_DEFAULT = 25000 |
Default value of innodb_log_wait_for_flush_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_WAIT_FOR_FLUSH_SPIN_HWM_DEFAULT = 400 |
Default value of innodb_log_wait_for_flush_spin_hwm (in microseconds). More... | |
constexpr ulong | INNODB_LOG_WAIT_FOR_FLUSH_TIMEOUT_DEFAULT = 1000 |
Default value of innodb_log_wait_for_flush_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_FLUSHER_SPIN_DELAY_DEFAULT = 250000 |
Default value of innodb_log_flusher_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_FLUSHER_TIMEOUT_DEFAULT = 10 |
Default value of innodb_log_flusher_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_WRITE_NOTIFIER_SPIN_DELAY_DEFAULT = 0 |
Default value of innodb_log_write_notifier_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_WRITE_NOTIFIER_TIMEOUT_DEFAULT = 10 |
Default value of innodb_log_write_notifier_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_FLUSH_NOTIFIER_SPIN_DELAY_DEFAULT = 0 |
Default value of innodb_log_flush_notifier_spin_delay (in spin rounds). More... | |
constexpr ulong | INNODB_LOG_FLUSH_NOTIFIER_TIMEOUT_DEFAULT = 10 |
Default value of innodb_log_flush_notifier_timeout (in microseconds). More... | |
constexpr ulong | INNODB_LOG_BUFFER_SIZE_DEFAULT = 16 * 1024 * 1024UL |
Default value of innodb_log_buffer_size (in bytes). More... | |
constexpr ulong | INNODB_LOG_BUFFER_SIZE_MIN = 256 * 1024UL |
Minimum allowed value of innodb_log_buffer_size. More... | |
constexpr ulong | INNODB_LOG_BUFFER_SIZE_MAX = UINT32_MAX |
Maximum allowed value of innodb_log_buffer_size. More... | |
constexpr ulong | INNODB_LOG_RECENT_WRITTEN_SIZE_DEFAULT = 1024 * 1024 |
Default value of innodb_log_recent_written_size (in bytes). More... | |
constexpr ulong | INNODB_LOG_RECENT_WRITTEN_SIZE_MIN = OS_FILE_LOG_BLOCK_SIZE |
Minimum allowed value of innodb_log_recent_written_size. More... | |
constexpr ulong | INNODB_LOG_RECENT_WRITTEN_SIZE_MAX = 1024 * 1024 * 1024UL |
Maximum allowed value of innodb_log_recent_written_size. More... | |
constexpr ulong | INNODB_LOG_RECENT_CLOSED_SIZE_DEFAULT = 2 * 1024 * 1024 |
Default value of innodb_log_recent_closed_size (in bytes). More... | |
constexpr ulong | INNODB_LOG_RECENT_CLOSED_SIZE_MIN = OS_FILE_LOG_BLOCK_SIZE |
Minimum allowed value of innodb_log_recent_closed_size. More... | |
constexpr ulong | INNODB_LOG_RECENT_CLOSED_SIZE_MAX = 1024 * 1024 * 1024UL |
Maximum allowed value of innodb_log_recent_closed_size. More... | |
constexpr ulong | INNODB_LOG_EVENTS_DEFAULT = 2048 |
Default value of innodb_log_events (number of events). More... | |
constexpr ulong | INNODB_LOG_EVENTS_MIN = 1 |
Minimum allowed value of innodb_log_events. More... | |
constexpr ulong | INNODB_LOG_EVENTS_MAX = 1024 * 1024 * 1024UL |
Maximum allowed value of innodb_log_events. More... | |
constexpr ulong | INNODB_LOG_WRITE_AHEAD_SIZE_DEFAULT = 8192 |
Default value of innodb_log_write_ahead_size (in bytes). More... | |
constexpr ulong | INNODB_LOG_WRITE_AHEAD_SIZE_MIN = OS_FILE_LOG_BLOCK_SIZE |
Minimum allowed value of innodb_log_write_ahead_size. More... | |
constexpr ulint | INNODB_LOG_WRITE_AHEAD_SIZE_MAX |
Maximum allowed value of innodb_log_write_ahead_size. More... | |
Log constants used in the tests of the redo log. | |
constexpr int64_t | MLOG_TEST_VALUE = 10000 |
Value to which MLOG_TEST records should sum up within a group. More... | |
constexpr uint32_t | MLOG_TEST_MAX_REC_LEN = 100 |
Maximum size of single MLOG_TEST record (in bytes). More... | |
constexpr uint32_t | MLOG_TEST_GROUP_MAX_REC_N = 100 |
Maximum number of MLOG_TEST records in single group of log records. More... | |
constexpr uint32_t | MLOG_TEST_REC_OVERHEAD = 37 |
Bytes occupied by MLOG_TEST record with an empty payload. More... | |
Log constants related to the log file format. | |
#define | LOG_HEADER_CREATOR_CURRENT "MySQL " INNODB_VERSION_STR |
Contents of the LOG_HEADER_CREATOR field. More... | |
#define | LOG_HEADER_CREATOR_CLONE "MySQL Clone" |
Header is created during DB clone. More... | |
constexpr uint32_t | LOG_NO_CHECKSUM_MAGIC = 0xDEADBEEFUL |
Magic value to use instead of log checksums when they are disabled. More... | |
constexpr lsn_t | LOG_START_LSN = 16 * OS_FILE_LOG_BLOCK_SIZE |
The counting of lsn's starts from this value: this must be non-zero. More... | |
constexpr lsn_t | LSN_MAX = (1ULL << 63) - 1 |
Maximum possible lsn value is slightly higher than the maximum sn value, because lsn sequence enumerates also bytes used for headers and footers of all log blocks. More... | |
constexpr sn_t | SN_LOCKED = 1ULL << 63 |
The sn bit to express locked state. More... | |
constexpr os_offset_t | LOG_CHECKPOINT_1 = OS_FILE_LOG_BLOCK_SIZE |
First checkpoint field in the log header. More... | |
constexpr os_offset_t | LOG_ENCRYPTION = 2 * OS_FILE_LOG_BLOCK_SIZE |
Log Encryption information in redo log header. More... | |
constexpr os_offset_t | LOG_CHECKPOINT_2 = 3 * OS_FILE_LOG_BLOCK_SIZE |
Second checkpoint field in the header of the first log file. More... | |
constexpr os_offset_t | LOG_FILE_HDR_SIZE = 4 * OS_FILE_LOG_BLOCK_SIZE |
Size of log file's header. More... | |
constexpr os_offset_t | LOG_HEADER_FORMAT = 0 |
Log file header format identifier (32-bit unsigned big-endian integer). More... | |
constexpr uint32_t | LOG_HEADER_LOG_UUID = 4 |
Offset within the log file header, to the field which stores the log_uuid. More... | |
constexpr os_offset_t | LOG_HEADER_START_LSN = 8 |
LSN of the start of data in this log file (with format version 1 and 2). More... | |
constexpr os_offset_t | LOG_HEADER_CREATOR = 16 |
A null-terminated string which will contain either the string 'MEB' and the MySQL version if the log file was created by mysqlbackup, or 'MySQL' and the MySQL version that created the redo log file. More... | |
constexpr size_t | LOG_HEADER_CREATOR_MAX_LENGTH = 31 |
Maximum length of string with creator name (excludes \0). More... | |
constexpr os_offset_t | LOG_HEADER_CREATOR_END |
End of the log file creator field (we add 1 for \0). More... | |
constexpr os_offset_t | LOG_HEADER_ENCRYPTION_INFO_OFFSET |
Offset to encryption information in the log encryption header. More... | |
constexpr os_offset_t | LOG_HEADER_FLAGS = LOG_HEADER_CREATOR_END |
32 BITs flag More... | |
constexpr uint32_t | LOG_HEADER_FLAG_NO_LOGGING = 1 |
Flag at BIT-1 to indicate if redo logging is disabled or not. More... | |
constexpr uint32_t | LOG_HEADER_FLAG_CRASH_UNSAFE = 2 |
Flag at BIT-2 to indicate if server is not recoverable on crash. More... | |
constexpr uint32_t | LOG_HEADER_FLAG_NOT_INITIALIZED = 3 |
Flag at BIT-3 to indicate if server is not recoverable on crash because data directory still has not been fully initialized. More... | |
constexpr uint32_t | LOG_HEADER_FLAG_FILE_FULL = 4 |
Flag at BIT-4 to mark the redo log file as completely full and closed for any future writes. More... | |
constexpr uint32_t | LOG_HEADER_FLAG_MAX = LOG_HEADER_FLAG_FILE_FULL |
Maximum BIT position number. More... | |
constexpr os_offset_t | LOG_HEADER_SIZE = LOG_HEADER_FLAGS + 4 |
Current total size of LOG header. More... | |
constexpr os_offset_t | LOG_CHECKPOINT_LSN = 8 |
Checkpoint lsn. More... | |
constexpr uint32_t | LOG_BLOCK_HDR_NO = 0 |
Offset to hdr_no, which is a log block number and must be > 0. More... | |
constexpr uint32_t | LOG_BLOCK_FLUSH_BIT_MASK = 0x80000000UL |
Mask used to get the highest bit in the hdr_no field. More... | |
constexpr uint32_t | LOG_BLOCK_MAX_NO = 0x3FFFFFFFUL + 1 |
Maximum allowed block's number (stored in hdr_no) increased by 1. More... | |
constexpr uint32_t | LOG_BLOCK_HDR_DATA_LEN = 4 |
Offset to number of bytes written to this block (also header bytes). More... | |
constexpr uint32_t | LOG_BLOCK_ENCRYPT_BIT_MASK = 0x8000UL |
Mask used to get the highest bit in the data len field, this bit is to indicate if this block is encrypted or not. More... | |
constexpr uint32_t | LOG_BLOCK_FIRST_REC_GROUP = 6 |
Offset to "first_rec_group offset" stored in the log block header. More... | |
constexpr uint32_t | LOG_BLOCK_EPOCH_NO = 8 |
Offset to epoch_no stored in this log block. More... | |
constexpr uint32_t | LOG_BLOCK_HDR_SIZE = 12 |
Size of the log block's header in bytes. More... | |
constexpr uint32_t | LOG_BLOCK_CHECKSUM = 4 |
4 byte checksum of the log block contents. More... | |
constexpr uint32_t | LOG_BLOCK_TRL_SIZE = 4 |
Size of the log block footer (trailer) in bytes. More... | |
constexpr uint32_t | LOG_BLOCK_DATA_SIZE |
Size of log block's data fragment (where actual data is stored). More... | |
Redo log constant values.
This file should not be included except the include in log0types.h.
Include log0types.h if you needed to use constants.
#define LOG_HEADER_CREATOR_CLONE "MySQL Clone" |
Header is created during DB clone.
#define LOG_HEADER_CREATOR_CURRENT "MySQL " INNODB_VERSION_STR |
Contents of the LOG_HEADER_CREATOR field.
|
constexpr |
Default value of innodb_log_buffer_size (in bytes).
|
constexpr |
Maximum allowed value of innodb_log_buffer_size.
|
constexpr |
Minimum allowed value of innodb_log_buffer_size.
|
constexpr |
Default value of innodb_log_checkpointer_every (in milliseconds).
|
constexpr |
Default value of innodb_log_events (number of events).
|
constexpr |
Maximum allowed value of innodb_log_events.
|
constexpr |
Minimum allowed value of innodb_log_events.
|
constexpr |
Default value of innodb_log_flush_notifier_spin_delay (in spin rounds).
|
constexpr |
Default value of innodb_log_flush_notifier_timeout (in microseconds).
|
constexpr |
Default value of innodb_log_flusher_spin_delay (in spin rounds).
Read about INNODB_LOG_WRITER_SPIN_DELAY_DEFAULT.
|
constexpr |
Default value of innodb_log_flusher_timeout (in microseconds).
Note that it will anyway take at least 50us.
|
constexpr |
Default value of innodb_log_recent_closed_size (in bytes).
|
constexpr |
Maximum allowed value of innodb_log_recent_closed_size.
|
constexpr |
Minimum allowed value of innodb_log_recent_closed_size.
|
constexpr |
Default value of innodb_log_recent_written_size (in bytes).
|
constexpr |
Maximum allowed value of innodb_log_recent_written_size.
|
constexpr |
Minimum allowed value of innodb_log_recent_written_size.
|
constexpr |
Default value of innodb_log_spin_cpu_abs_lwm.
Expressed in percent (80 stands for 80%) of a single CPU core.
|
constexpr |
Default value of innodb_log_spin_cpu_pct_hwm.
Expressed in percent (50 stands for 50%) of all CPU cores.
|
constexpr |
Default value of innodb_log_wait_for_flush_spin_delay (in spin rounds).
Read about INNODB_LOG_WAIT_FOR_WRITE_SPIN_DELAY_DEFAULT. The same mechanism applies here (to compute max rounds).
|
constexpr |
Default value of innodb_log_wait_for_flush_spin_hwm (in microseconds).
|
constexpr |
Default value of innodb_log_wait_for_flush_timeout (in microseconds).
|
constexpr |
Default value of innodb_log_wait_for_write_spin_delay (in spin rounds).
Read about INNODB_LOG_WRITER_SPIN_DELAY_DEFAULT. Number of spin rounds is calculated according to current usage of CPU cores. If the usage is smaller than lwm percents of single core, then max rounds = 0. If the usage is smaller than 50% of hwm percents of all cores, then max rounds is decreasing linearly from 10x innodb_log_writer_spin_delay to 1x (for 50%). Then in range from 50% of hwm to 100% of hwm, the max rounds stays equal to the innodb_log_writer_spin_delay, because it doesn't make sense to use too short waits. Hence this is minimum value for the max rounds when non-zero value is being used.
|
constexpr |
Default value of innodb_log_wait_for_write_timeout (in microseconds).
|
constexpr |
Default value of innodb_log_write_ahead_size (in bytes).
|
constexpr |
Maximum allowed value of innodb_log_write_ahead_size.
|
constexpr |
Minimum allowed value of innodb_log_write_ahead_size.
|
constexpr |
Default value of innodb_log_write_max_size (in bytes).
|
constexpr |
Default value of innodb_log_write_notifier_spin_delay (in spin rounds).
|
constexpr |
Default value of innodb_log_write_notifier_timeout (in microseconds).
|
constexpr |
Default value of innodb_log_writer_spin_delay (in spin rounds).
We measured that 1000 spin round takes 4us. We decided to select 1ms as the maximum time for busy waiting. Therefore it corresponds to 250k spin rounds. Note that first wait on event takes 50us-100us (even if 10us is passed), so it is 5%-10% of the total time that we have already spent on busy waiting, when we fall back to wait on event.
|
constexpr |
Default value of innodb_log_writer_timeout (in microseconds).
Note that it will anyway take at least 50us.
|
constexpr |
Controls when the aggressive checkpointing should be started, with regards to the free space in the redo log.
Should be bigger than LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MAX.
|
constexpr |
Maximum number of concurrent background threads, that could be using mini transactions which are not read-only (producing redo log records).
These are threads, which also call log_free_check() to reserve space in the redo log, but which are not included in the innodb_thread_concurrency limitation. That's why this number is added to the innodb_thread_concurrency when computing the concurrency_margin, which is used in log_free_check() calls.
|
constexpr |
4 byte checksum of the log block contents.
In InnoDB versions < 3.23.52 this did not contain the checksum, but the same value as .._HDR_NO.
|
constexpr |
Size of log block's data fragment (where actual data is stored).
|
constexpr |
Mask used to get the highest bit in the data len field, this bit is to indicate if this block is encrypted or not.
|
constexpr |
Offset to epoch_no stored in this log block.
The epoch_no is computed as the number of epochs passed by the value of start_lsn of the log block. Single epoch is defined as range of lsn values containing LOG_BLOCK_MAX_NO log blocks, each of OS_FILE_LOG_BLOCK_SIZE bytes. Note, that hdr_no stored in header of log block at offset=LOG_BLOCK_HDR_NO, can address the block within a given epoch, whereas epoch_no stored at offset=LOG_BLOCK_EPOCH_NO is the number of full epochs that were before. The pair <epoch_no, hdr_no> would be the absolute block number, so the epoch_no helps in discovery of unexpected end of the log during recovery in similar way as hdr_no does.
|
constexpr |
Offset to "first_rec_group offset" stored in the log block header.
The first_rec_group offset is an offset of the first start of mtr log record group in this log block (0 if no mtr starts in that log block).
If the value is the same as LOG_BLOCK_HDR_DATA_LEN, it means that the first rec group has not yet been concatenated to this log block, but if it was supposed to be appended, it would start at this offset.
An archive recovery can start parsing the log records starting from this offset in this log block, if value is not 0.
|
constexpr |
Mask used to get the highest bit in the hdr_no field.
In the older MySQL versions this bit was used to mark first block in a write.
|
constexpr |
Offset to number of bytes written to this block (also header bytes).
|
constexpr |
Offset to hdr_no, which is a log block number and must be > 0.
It is allowed to wrap around at LOG_BLOCK_MAX_NO. In older versions of MySQL the highest bit (LOG_BLOCK_FLUSH_BIT_MASK) of hdr_no is set to 1, if this is the first block in a call to write.
|
constexpr |
Size of the log block's header in bytes.
|
constexpr |
Maximum allowed block's number (stored in hdr_no) increased by 1.
|
constexpr |
Size of the log block footer (trailer) in bytes.
|
constexpr |
Align the log buffer (log_t::buf) to this size.
This is to preserve the compatibility with older MySQL versions which also aligned the log buffer to OS_FILE_LOG_BLOCK_SIZE. Note, that each write from the log buffer starts at the beginning of one of the blocks in this buffer i.e. from address being a multiple of OS_FILE_LOG_BLOCK_SIZE. Therefore any bigger value for alignment here does not make sense. Please do not use this constant for other buffers.
|
constexpr |
Maximum allowed value for innodb_redo_log_capacity.
|
constexpr |
Minimum allowed value for innodb_redo_log_capacity.
|
constexpr |
First checkpoint field in the log header.
We write alternately to the checkpoint fields when we make new checkpoints. This field is only defined in the first log file.
|
constexpr |
Second checkpoint field in the header of the first log file.
|
constexpr |
Per thread margin for the free space in the log, before a new query step which modifies the database, is started.
It's multiplied by maximum number of threads, that can concurrently enter mini-transactions. Expressed in number of pages.
|
constexpr |
Checkpoint lsn.
Recovery starts from this lsn and searches for the first log record group that starts since then.
|
constexpr |
The maximum limit for concurrency_margin expressed as percentage of the redo capacity available for user threads (soft capacity).
|
constexpr |
Name of subdirectory which contains redo log files.
|
constexpr |
Log Encryption information in redo log header.
|
constexpr |
Extra margin, reserved in the redo capacity for the concurrency margin.
Expressed in percentage of the total redo capacity available for user threads (soft capacity). Excluded from LOG_CONCCURENCY_MARGIN_MAX_PCT.
|
constexpr |
Extra safety margin in the redo capacity, never ever used !
|
constexpr |
Extra margin, reserved in the redo capacity for the log writer thread.
When checkpoint age exceeds its maximum limits and user threads are waiting in log_free_check() calls, the log writer thread still has "extra margin" space reserved in the log files (it is his private fragment of the redo log, not announced to users of the redo log). When that happens, all user threads are paused at log_free_check. This mechanism is supposed to help with getting out of possible deadlocks between mini-transactions holding latched pages and page cleaners trying to reclaim space in the redo log by flushing the oldest modified pages. It is supposed to help if the innodb_thread_concurrency is unlimited or we missed to do some log_free_check() calls. This margin is expressed in percentage of the total redo capacity available for the log writer thread (hard capacity).
|
constexpr |
Prefix of log file name in the current redo format.
|
constexpr |
Size of log file's header.
|
constexpr |
Maximum size of a log file, expressed in bytes.
|
constexpr |
Minimum size of single log file, expressed in bytes.
|
constexpr |
Maximum length of log file name, computed as: base name length(8)
|
constexpr |
Number of bytes that might be generated by log_files_governor thread to fill up the current log file faster.
Note that before generating those bytes, the log_files_governor checks if log_free_check is required:
|
constexpr |
Id of the first redo log file (assigned to the first log file when new data directory is being initialized).
|
constexpr |
Controls when the maximum speed of adaptive flushing of modified pages is reached (with regards to free space in the redo log).
|
constexpr |
Controls when the speed of adaptive flushing of modified pages starts to increase.
Should be less than the LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MAX.
|
constexpr |
A null-terminated string which will contain either the string 'MEB' and the MySQL version if the log file was created by mysqlbackup, or 'MySQL' and the MySQL version that created the redo log file.
|
constexpr |
End of the log file creator field (we add 1 for \0).
|
constexpr |
Maximum length of string with creator name (excludes \0).
|
constexpr |
Offset to encryption information in the log encryption header.
|
constexpr |
Flag at BIT-2 to indicate if server is not recoverable on crash.
This is set only when redo logging is disabled and unset on slow shutdown after all pages are flushed to disk.
|
constexpr |
Flag at BIT-4 to mark the redo log file as completely full and closed for any future writes.
|
constexpr |
Maximum BIT position number.
Should be set to the latest added.
|
constexpr |
Flag at BIT-1 to indicate if redo logging is disabled or not.
|
constexpr |
Flag at BIT-3 to indicate if server is not recoverable on crash because data directory still has not been fully initialized.
|
constexpr |
32 BITs flag
|
constexpr |
Log file header format identifier (32-bit unsigned big-endian integer).
This used to be called LOG_GROUP_ID and always written as 0, because InnoDB never supported more than one copy of the redo log.
|
constexpr |
Offset within the log file header, to the field which stores the log_uuid.
The log_uuid is chosen after a new data directory is initialized, and allows to detect situation, in which some of log files came from other data directory (detection is performed on startup, before starting recovery).
|
constexpr |
Current total size of LOG header.
|
constexpr |
LSN of the start of data in this log file (with format version 1 and 2).
|
constexpr |
Maximum number of handles for opened redo log files (in parallel).
The following handles for opened files have been identified during runtime:
|
constexpr |
Targeted number of log files.
|
constexpr |
Determines maximum downsize for maximum redo file size during resize.
If maximum file size is 8G, then 1.0/8 means, that InnoDB needs to first achieve maximum file size equal to 1G before targeting even lower values.
|
constexpr |
Margin which is used ahead of log.write_lsn to create unused files earlier than the log.write_lsn reaches the m_end_lsn of the log.m_current_file.
This margin is expressed in percentage of the next file size.
|
constexpr |
Magic value to use instead of log checksums when they are disabled.
|
constexpr |
The counting of lsn's starts from this value: this must be non-zero.
|
constexpr |
Align the log write-ahead buffer (log_t::write_ahead_buf) to this size.
This increases chance that the write-ahead buffer is spanned over smaller number of memory pages. Please do not use this constant for other buffers.
|
constexpr |
Maximum possible lsn value is slightly higher than the maximum sn value, because lsn sequence enumerates also bytes used for headers and footers of all log blocks.
However, still 64-bits are enough to represent the maximum lsn value, because only 63 bits are used to represent sn value.
|
constexpr |
Maximum number of MLOG_TEST records in single group of log records.
|
constexpr |
Maximum size of single MLOG_TEST record (in bytes).
|
constexpr |
Bytes occupied by MLOG_TEST record with an empty payload.
|
constexpr |
Value to which MLOG_TEST records should sum up within a group.
|
constexpr |
The sn bit to express locked state.