MySQL 9.1.0
Source Code Documentation
|
Redo log files - governor. More...
#include <algorithm>
#include "log0buf.h"
#include "log0chkp.h"
#include "log0encryption.h"
#include "log0files_capacity.h"
#include "log0files_io.h"
#include "log0files_governor.h"
#include "log0log.h"
#include "log0sys.h"
#include "log0test.h"
#include "log0types.h"
#include "log0write.h"
#include "os0file.h"
#include "sql/current_thd.h"
#include "sql/debug_sync.h"
#include "sql/sql_thd_internal_api.h"
#include "srv0srv.h"
#include "srv0start.h"
#include "ut0byte.h"
#include "ut0new.h"
Namespaces | |
namespace | log_files |
Functions | |
static os_offset_t | log_files::physical_size (const log_t &log, os_offset_t unused_file_size) |
static bool | log_files::physical_capacity_allows_to_recycle (const log_t &log, os_offset_t removed_file_size, os_offset_t unused_file_size) |
static bool | log_files::physical_capacity_allows_to_create (const log_t &log, os_offset_t unused_file_size) |
static size_t | log_files::number_of_files (const log_t &log) |
static bool | log_files::is_newest_lsn_nearby_the_end (const log_t &log) |
static bool | log_files::number_of_files_enforced_to_allow (const log_t &log) |
static bool | log_files::number_of_files_allows_to_recycle (const log_t &log) |
Checks if current number of redo files allows to recycle the oldest one. More... | |
static bool | log_files::number_of_files_allows_to_create (const log_t &log) |
Checks if current number of redo files allows to create a new unused file. More... | |
static bool | log_files::might_recycle_file (const log_t &log, os_offset_t removed_file_size, os_offset_t unused_file_size) |
static bool | log_files::might_create_unused_file (const log_t &log, os_offset_t unused_file_size) |
bool | log_files::is_consumption_needed (const log_t &log) |
Checks if consumption of the oldest redo log files needs to be done or might be postponed. More... | |
Log - files initialization and handling sysvar updates | |
static void | log_files_initialize (log_t &log, lsn_t current_logical_size, lsn_t current_checkpoint_age) |
Computes initial capacity limits and size suggested for the next log file. More... | |
void | log_files_initialize_on_empty_redo (log_t &log) |
Computes initial capacity limits and size suggested for the next log file. More... | |
void | log_files_initialize_on_existing_redo (log_t &log) |
Computes initial capacity limits and size suggested for the next log file. More... | |
static void | log_files_wait_until_next_governor_iteration (log_t &log) |
Waits until the log_files_governor performs a next iteration of its loop. More... | |
void | log_files_resize_requested (log_t &log) |
Updates capacity limitations after srv_redo_log_capacity_used has been changed. More... | |
void | log_files_thread_concurrency_updated (log_t &log) |
Updates capacity limitations after srv_thread_concurrency has been changed. More... | |
Log - files management. | |
enum class | Log_files_governor_iteration_result { RETRY_WITH_WRITER_MUTEX , COMPLETED_BUT_NEED_MORE_INTAKE , COMPLETED } |
Result of execution of log_files_governor_iteration_low(). More... | |
typedef std::function< void(Log_file_id file_id, Log_file_header &file_header)> | Log_file_header_callback |
Callback type for callbacks called for a provided log file header. More... | |
static void | log_files_create_allowed_validate () |
Validates that new log files might be created. More... | |
static void | log_files_access_allowed_validate (const log_t &log) |
Validates that log.m_files might be accessed from the current thread. More... | |
static void | log_files_write_allowed_validate (const log_t &log) |
Validates that log.m_files might be accessed from the current thread and the current thread is allowed to perform write IO for redo log files, or create / remove / rename the existing redo log files. More... | |
static Log_file_header | log_files_prepare_header (const log_t &log, lsn_t file_start_lsn) |
Prepares a log file header according to: More... | |
static Log_file_header | log_files_prepare_header (const log_t &log, const Log_file &file) |
Prepares a log file header according to: More... | |
static void | log_files_validate_not_consumed (const log_t &log) |
Asserts that all log files with id greater or equal to id of the file containing the oldest lsn, have not been consumed / marked for consumption. More... | |
static void | log_files_validate_current_file (const log_t &log) |
Asserts that the current file exists and contains the log_files_newest_needed_lsn(log). More... | |
static dberr_t | log_files_create_file (log_t &log, Log_file_id file_id, lsn_t start_lsn, lsn_t checkpoint_lsn, bool create_first_data_block) |
Creates a new redo log file and resizes the file to the size returned by log.m_capacity.next_file_size(). More... | |
static dberr_t | log_files_rewrite_old_headers (log_t &log, Log_file_header_callback before_write, Log_file_header_callback after_write) |
Rewrites header of each of log files except the header of the newest file. More... | |
static dberr_t | log_files_rewrite_newest_header (log_t &log, Log_file_header_callback cbk) |
Rewrites header of the newest log file, preparing it accordingly to the current metadata of the file, which is stored in memory (in log.m_files). More... | |
static dberr_t | log_files_mark_current_file_as_incomplete (log_t &log) |
Rewrites header of the current log file (log.m_current_file) marking the file as not full in log_flags stored in the header. More... | |
static dberr_t | log_files_mark_current_file_as_full (log_t &log) |
Rewrites header of the current log file (log.m_current_file) marking the file as full in log_flags stored in the header. More... | |
static void | log_files_update_current_file_low (log_t &log) |
Updates log.m_current_file and (re-)opens that file (therefore also the log.m_current_file_handle becomes updated). More... | |
static lsn_t | log_files_oldest_needed_lsn (const log_t &log) |
Finds the oldest LSN required by some of currently registered log consumers. More... | |
static lsn_t | log_files_newest_needed_lsn (const log_t &log) |
Finds the newest LSN which potentially might be interesting for currently registered log consumers. More... | |
static dberr_t | log_files_remove_from_future (log_t &log) |
Removes redo log files for LSN ranges (from future) with m_start_lsn larger than log_files_newest_needed_lsn(log). More... | |
static dberr_t | log_files_remove_file (log_t &log, Log_file_id file_id) |
Removes the file from disk and after that from log.m_files. More... | |
static std::pair< lsn_t, lsn_t > | log_files_logical_size_and_checkpoint_age (const log_t &log) |
Computes current logical size of the redo log and the minimum suggested soft (excluding extra_margin) logical capacity for the current redo log data. More... | |
static os_offset_t | log_files_next_file_size (const log_t &log) |
Provides size for the next redo log file that will be created, unless there is not enough free space in current physical capacity, in which case it returns zero. More... | |
static void | log_files_update_capacity_limits (log_t &log) |
Updates capacity limitations (log.m_capacity. More... | |
static void | log_files_generate_dummy_records (log_t &log, lsn_t min_size) |
Generates at least a given bytes of intake to the redo log. More... | |
static bool | log_files_is_truncate_allowed (const log_t &log) |
Checks if redo log file truncation is allowed. More... | |
static void | log_files_truncate (log_t &log) |
Truncates the redo log file. More... | |
static void | log_files_mark_consumed_file (log_t &log, Log_file_id file_id) |
Marks the given file as consumed by the registered redo log consumers. More... | |
static void | log_files_mark_consumed_files (log_t &log) |
Marks each redo log file which became consumed by all registered redo log consumers, as consumed. More... | |
static bool | log_files_remove_consumed_file (log_t &log, Log_file_id file_id) |
Removes the given consumed redo log file. More... | |
static bool | log_files_recycle_file (log_t &log, Log_file_id file_id, os_offset_t unused_file_size) |
Recycles the given consumed redo log file. More... | |
static bool | log_files_process_consumed_file (log_t &log, Log_file_id file_id) |
Process the given consumed redo log file (recycle or remove the file). More... | |
static void | log_files_process_consumed_files (log_t &log) |
Process all redo log files marked as consumed (recycling or removing each). More... | |
static void | log_files_create_next_as_unused_if_needed (log_t &log) |
Create a spare unused redo log file if there was no such file. More... | |
static bool | log_files_consuming_oldest_file_takes_too_long (const log_t &log) |
Checks if the redo log consumption, according to the measured average speed of consumption, is too slow to consume the oldest file in reasonable time (10 seconds). More... | |
static bool | log_files_filling_oldest_file_takes_too_long (const log_t &log) |
Checks if the redo log, according to the measured average speed, is not being filled fast enough to fill the oldest redo log file in reasonable time (10 seconds). More... | |
static bool | log_files_should_rush_oldest_file_consumption (const log_t &log) |
Checks if there are any reasons to rush consumption of the oldest redo log file, that is if either: More... | |
static void | log_files_adjust_unused_files_sizes (log_t &log) |
Ensures that unused redo log files have log.m_capacity.next_file_size(). More... | |
static Log_files_governor_iteration_result | log_files_governor_iteration_low (log_t &log, bool has_writer_mutex) |
Tries to perform a single iteration of the log_files_governor thread. More... | |
static void | log_files_governor_iteration (log_t &log) |
Performs a single iteration of the log_files_governor thread. More... | |
static dberr_t | log_files_prepare_unused_file (log_t &log, Log_file_id file_id, lsn_t start_lsn, lsn_t checkpoint_lsn, bool create_first_data_block, os_offset_t &file_size) |
static Log_file_id | log_files_next_unused_id (log_t &log) |
dberr_t | log_files_produce_file (log_t &log) |
Creates a next log file, ready for writes. More... | |
void | log_files_governor (log_t *log_ptr) |
The log files governor thread routine. More... | |
void | log_files_wait_for_next_file_available (log_t &log) |
Waits until a next log file is available and can be produced. More... | |
dberr_t | log_files_create (log_t &log, lsn_t flushed_lsn) |
Creates a new set of redo log files. More... | |
void | log_files_remove (log_t &log) |
Removes all log files. More... | |
dberr_t | log_files_start (log_t &log) |
Starts the log file management. More... | |
dberr_t | log_files_persist_flags (log_t &log, Log_flags log_flags) |
Persists log flags to the newest log file. More... | |
dberr_t | log_files_reset_creator_and_set_full (log_t &log) |
Resets creator name to the current creator and marks all files as full in their headers by setting LOG_HEADER_FLAG_FILE_FULL bit in the log_flags field. More... | |
void | log_files_update_encryption (log_t &log, const Encryption_metadata &encryption_metadata) |
Updates the encryption metadata stored in-memory for all redo log files. More... | |
void | log_files_dummy_records_request_disable (log_t &log) |
Disallows to generate dummy redo records but does not wait until the log_files_governor promised not to generate them anymore. More... | |
void | log_files_dummy_records_disable (log_t &log) |
Disallows to generate dummy redo records and waits until the log_files_governor thread promised not to generate them. More... | |
Redo log files - governor.
This module contains functions, which are useful during startup, for:
However, the major part of this module is the log_files_governor's implementation. This thread is fully responsible for:
This module is responsible for managing redo log files on disk and keeping them in-sync with in-memory data structures: log.m_files, log.m_encryption_metadata.
typedef std::function<void(Log_file_id file_id, Log_file_header &file_header)> Log_file_header_callback |
Callback type for callbacks called for a provided log file header.
[in] | file_id | id of the log file which owns the header |
[in,out] | file_header | initially filled header of redo file, accordingly to its currently known meta data; should be updated by callback if needed |
|
strong |
Result of execution of log_files_governor_iteration_low().
|
static |
Validates that log.m_files might be accessed from the current thread.
Validates that log.m_files_mutex is acquired unless srv_is_being_stated is true.
[in] | log | redo log |
|
static |
Ensures that unused redo log files have log.m_capacity.next_file_size().
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
|
static |
Checks if the redo log consumption, according to the measured average speed of consumption, is too slow to consume the oldest file in reasonable time (10 seconds).
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
Maximum time it might take to consume the oldest redo log file since now. If the average lsn consumption speed shows that most likely this time will not be enough for the oldest file to become consumed, then the oldest redo log consumer must be requested to proceed faster.
Creates a new set of redo log files.
[in,out] | log | redo log |
[in] | flushed_lsn | the new set of log files should start with log block in which flushed_lsn is located, and flushed_lsn should point right after this block header. |
|
static |
Validates that new log files might be created.
|
static |
Creates a new redo log file and resizes the file to the size returned by log.m_capacity.next_file_size().
If checkpoint_lsn != 0, it also must hold: checkpoint_lsn >= start_lsn. The checkpoint information is stored to both checkpoint headers of the new file. When create_first_data_block is true, the first data block is modified also in the log buffer and written to disk
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
[in] | file_id | id of the log file to create |
[in] | start_lsn | start_lsn for the log file |
[in] | checkpoint_lsn | lsn of the current checkpoint if it is located in the file, or zero |
[in] | create_first_data_block | true iff should format the first data block in log.buf and write to the file |
|
static |
Create a spare unused redo log file if there was no such file.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
void log_files_dummy_records_disable | ( | log_t & | log | ) |
Disallows to generate dummy redo records and waits until the log_files_governor thread promised not to generate them.
[in,out] | log | redo log |
void log_files_dummy_records_request_disable | ( | log_t & | log | ) |
Disallows to generate dummy redo records but does not wait until the log_files_governor promised not to generate them anymore.
[in,out] | log | redo log |
|
static |
Checks if the redo log, according to the measured average speed, is not being filled fast enough to fill the oldest redo log file in reasonable time (10 seconds).
Note, that if there are multiple redo log files, then the oldest file has already been filled, in which case this function would return false.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
Generates at least a given bytes of intake to the redo log.
Requirement: none of log.m_files_mutex, log.writer_mutex, log.flusher_mutex, log.checkpointer_mutex is acquired when the function is called.
Requirement: the log_files_governor thread still hasn't promised not to generate dummy redo records (!log.m_no_more_dummy_records_promised).
[in,out] | log | redo log |
[in] | min_size | min number of bytes to write to the log buffer |
void log_files_governor | ( | log_t * | log_ptr | ) |
The log files governor thread routine.
[in,out] | log_ptr | pointer to redo log |
|
static |
Performs a single iteration of the log_files_governor thread.
It first tries to perform the iteration without the log.writer_mutex. However, if that failed then this function would retry the attempt, after acquiring the log.writer_mutex.
Requirement: none of log.m_files_mutex, log.writer_mutex acquired before calling this function.
[in,out] | log | redo log |
|
static |
Tries to perform a single iteration of the log_files_governor thread.
However, it might turn out, that the log.writer_mutex is required to perform required actions. In such case (happens only when has_writer_mutex is false) this function returns earlier, without completing all the steps and returns the Log_files_governor_iteration_result::RETRY_WITH_WRITER_MUTEX value. Then caller is responsible for repeating the call, after acquiring the log.writer_mutex.
Requirement: log.m_files_mutex not acquired before calling this function and log.writer_mutex acquired iff has_writer_mutex is true.
[in,out] | log | redo log |
[in] | has_writer_mutex | true iff this thread has log.writer_mutex acquired |
|
static |
Computes initial capacity limits and size suggested for the next log file.
Called after existing redo log files have been discovered (log.m_files), or when logically empty redo log is being initialized.
Requirement: srv_is_being_started is true.
[in,out] | log | redo log |
[in] | current_logical_size | current logical size of the redo log |
[in] | current_checkpoint_age | current checkpoint age |
void log_files_initialize_on_empty_redo | ( | log_t & | log | ) |
Computes initial capacity limits and size suggested for the next log file.
Called when logically empty redo log is being initialized.
[in,out] | log | redo log |
void log_files_initialize_on_existing_redo | ( | log_t & | log | ) |
Computes initial capacity limits and size suggested for the next log file.
Called after existing redo log files have been discovered (log.m_files).
[in,out] | log | redo log |
|
static |
Checks if redo log file truncation is allowed.
It is guaranteed that the conditions checked by this function are based on properties guarded by log.m_files_mutex. Note that this function checks only for allowance. It does not check if truncate is recommended to be done.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
|
static |
Computes current logical size of the redo log and the minimum suggested soft (excluding extra_margin) logical capacity for the current redo log data.
Note that this two values could be based on different redo log consumers, because different redo log consumers might be related to different margins preserved between size and capacity.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
|
static |
Marks the given file as consumed by the registered redo log consumers.
It allows to recycle or remove the file later, when log_files_process_consumed_files() is called.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
[in] | file_id | id of the file which should be marked as consumed |
|
static |
Marks each redo log file which became consumed by all registered redo log consumers, as consumed.
It allows to recycle or remove those files later, when log_files_process_consumed_files() is called.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
Rewrites header of the current log file (log.m_current_file) marking the file as full in log_flags stored in the header.
Updates metadata stored in log.m_files and log.m_current_file for that file.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
Rewrites header of the current log file (log.m_current_file) marking the file as not full in log_flags stored in the header.
Updates metadata stored in log.m_files and log.m_current_file for that file.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
Finds the newest LSN which potentially might be interesting for currently registered log consumers.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
|
static |
Provides size for the next redo log file that will be created, unless there is not enough free space in current physical capacity, in which case it returns zero.
If the zero was returned, then it's guaranteed that either:
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
|
static |
Finds the oldest LSN required by some of currently registered log consumers.
This is based on log_consumer_get_oldest().
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
Persists log flags to the newest log file.
Flushes header of the log file and updates log.m_log_flags if succeeded.
[in,out] | log | redo log |
[in] | log_flags | log_flags to persist |
|
static |
Prepares a log file header according to:
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
[in] | file | log file for which header is prepared |
|
static |
Prepares a log file header according to:
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
[in] | file_start_lsn | start lsn of the file |
|
static |
|
static |
Process the given consumed redo log file (recycle or remove the file).
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started) and the given file must have been marked as consumed before calling this function.
[in,out] | log | redo log |
[in] | file_id | id of the file which should be processed |
true | processed (recycled or removed) successfully |
false | failed to process (disk error) |
|
static |
Process all redo log files marked as consumed (recycling or removing each).
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
Creates a next log file, ready for writes.
Updates log.m_current_file.
[in,out] | log | redo log |
DB_SUCCESS | if created successfully |
DB_OUT_OF_DISK_SPACE | if there was no free space to create next file, according to limitations we have for redo files, or according to space physically available on the disk |
other | errors are possible |
|
static |
Recycles the given consumed redo log file.
This is called when the redo log files marked as consumed are being processed (recycled or removed). The file becomes renamed and joins the set of unused (spare) redo log files.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started) and the given file must have been marked as consumed before calling this function.
[in,out] | log | redo log |
[in] | file_id | id of the file which should be recycled |
[in] | unused_file_size | size to which the file should be resized |
true | recycled (including rename) successfully |
false | failed to rename (disk error) |
void log_files_remove | ( | log_t & | log | ) |
Removes all log files.
[in,out] | log | redo log |
|
static |
Removes the given consumed redo log file.
This is called when the redo log files marked as consumed are being processed (recycled or removed).
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started) and the given file must have been marked as consumed before calling this function.
[in,out] | log | redo log |
[in] | file_id | id of the file which should be removed |
true | removed successfully |
false | failed to remove (disk error) |
|
static |
Removes the file from disk and after that from log.m_files.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
[in] | file_id | id of the log file to remove |
Removes redo log files for LSN ranges (from future) with m_start_lsn larger than log_files_newest_needed_lsn(log).
The files are removed from disk and from the log.m_files.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
Resets creator name to the current creator and marks all files as full in their headers by setting LOG_HEADER_FLAG_FILE_FULL bit in the log_flags field.
Flushes headers of all log files and updates log.m_creator_name and log.m_files accordingly if succeeded (if fails, then some files might remain updated and some not; metadata stored in log.m_files should reflect that).
[in,out] | log | redo log |
void log_files_resize_requested | ( | log_t & | log | ) |
Updates capacity limitations after srv_redo_log_capacity_used has been changed.
It is called when user requests to change innodb_redo_log_capacity in runtime.
[in,out] | log | redo log |
|
static |
Rewrites header of the newest log file, preparing it accordingly to the current metadata of the file, which is stored in memory (in log.m_files).
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
[in] | cbk | callback which can modify the prepared log file header, before the write to disk |
|
static |
Rewrites header of each of log files except the header of the newest file.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
[in] | before_write | callback which can modify the prepared header, before the write |
[in] | after_write | callback called after the successful write |
|
static |
Checks if there are any reasons to rush consumption of the oldest redo log file, that is if either:
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
Starts the log file management.
[in] | log | redo log |
Existing log files are marked as not consumed.
void log_files_thread_concurrency_updated | ( | log_t & | log | ) |
Updates capacity limitations after srv_thread_concurrency has been changed.
It is called when user requests to change innodb_thread_concurrency in runtime.
[in,out] | log | redo log |
|
static |
Truncates the redo log file.
It must be called when there is exactly one redo log file.
Requirement: log.m_files_mutex and log.writer_mutex acquired before calling this function (unless srv_is_being_started) and log_files_is_truncate_allowed() must be allowing to do the truncation and there must exist exactly one redo log file.
[in,out] | log | redo log |
|
static |
Updates capacity limitations (log.m_capacity.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
|
static |
Updates log.m_current_file and (re-)opens that file (therefore also the log.m_current_file_handle becomes updated).
Requirement: log.m_files_mutex, log.writer_mutex and log.flusher_mutex acquired before calling this function (unless srv_is_being_started).
[in,out] | log | redo log |
void log_files_update_encryption | ( | log_t & | log, |
const Encryption_metadata & | encryption_metadata | ||
) |
Updates the encryption metadata stored in-memory for all redo log files.
Caller needs to have the log.m_files_mutex acquired before calling this.
[in,out] | log | redo log |
[in] | encryption_metadata | encryption metadata |
|
static |
Asserts that the current file exists and contains the log_files_newest_needed_lsn(log).
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
|
static |
Asserts that all log files with id greater or equal to id of the file containing the oldest lsn, have not been consumed / marked for consumption.
Requirement: log.m_files_mutex acquired before calling this function (unless srv_is_being_started).
[in] | log | redo log |
void log_files_wait_for_next_file_available | ( | log_t & | log | ) |
Waits until a next log file is available and can be produced.
[in] | log | redo log |
|
static |
Waits until the log_files_governor performs a next iteration of its loop.
Notifies the log_files_governor thread (to ensure it is soon).
[in,out] | log | redo log |
|
static |
Validates that log.m_files might be accessed from the current thread and the current thread is allowed to perform write IO for redo log files, or create / remove / rename the existing redo log files.
Validates that both log.m_files_mutex and log.writer_mutex are acquired unless srv_is_being_stated is true.
[in] | log | redo log |