MySQL 9.1.0
Source Code Documentation
|
Go to the source code of this file.
Functions | |
Log - waiting for redo written to disk. | |
Wait_stats | log_write_up_to (log_t &log, lsn_t lsn, bool flush_to_disk) |
Waits until the redo log is written up to a provided lsn. More... | |
uint64_t | log_total_flushes () |
Total number of redo log flushes (fsyncs) that have been started since the redo log system (log_sys) became initialized (. More... | |
uint64_t | log_pending_flushes () |
Number of currently pending redo log flushes (fsyncs in-progress). More... | |
void | log_writer_check_if_exited_extra_margin (log_t &log) |
Checks if the redo log writer exited extra margin. More... | |
Log - the log write threads. | |
#define | log_flusher_mutex_enter(log) mutex_enter(&((log).flusher_mutex)) |
#define | log_flusher_mutex_enter_nowait(log) mutex_enter_nowait(&((log).flusher_mutex)) |
#define | log_flusher_mutex_exit(log) mutex_exit(&((log).flusher_mutex)) |
#define | log_flusher_mutex_own(log) (mutex_own(&((log).flusher_mutex)) || !log_flusher_is_active()) |
#define | log_flush_notifier_mutex_enter(log) mutex_enter(&((log).flush_notifier_mutex)) |
#define | log_flush_notifier_mutex_exit(log) mutex_exit(&((log).flush_notifier_mutex)) |
#define | log_flush_notifier_mutex_own(log) (mutex_own(&((log).flush_notifier_mutex)) || !log_flush_notifier_is_active()) |
#define | log_writer_mutex_enter(log) mutex_enter(&((log).writer_mutex)) |
#define | log_writer_mutex_enter_nowait(log) mutex_enter_nowait(&((log).writer_mutex)) |
#define | log_writer_mutex_exit(log) mutex_exit(&((log).writer_mutex)) |
#define | log_writer_mutex_own(log) (mutex_own(&((log).writer_mutex)) || !log_writer_is_active()) |
#define | log_write_notifier_mutex_enter(log) mutex_enter(&((log).write_notifier_mutex)) |
#define | log_write_notifier_mutex_exit(log) mutex_exit(&((log).write_notifier_mutex)) |
#define | log_write_notifier_mutex_own(log) (mutex_own(&((log).write_notifier_mutex)) || !log_write_notifier_is_active()) |
void | log_control_writer_threads (log_t &log) |
Pause / resume the log writer, the log flusher, the log write notifier and the log flush notifier threads based on innodb_log_writer_threads value. More... | |
void | log_writer (log_t *log_ptr) |
The log writer thread routine. More... | |
void | log_flusher (log_t *log_ptr) |
The log flusher thread routine. More... | |
void | log_flush_notifier (log_t *log_ptr) |
The log flush notifier thread routine. More... | |
void | log_write_notifier (log_t *log_ptr) |
The log write notifier thread routine. More... | |
void | log_writer_thread_active_validate () |
Validates that the log writer thread is active. More... | |
void | log_background_write_threads_active_validate (const log_t &log) |
Validates that the log writer, flusher threads are active. More... | |
bool | log_writer_is_active () |
Checks if log writer thread is active. More... | |
bool | log_write_notifier_is_active () |
Checks if log write notifier thread is active. More... | |
bool | log_flusher_is_active () |
Checks if log flusher thread is active. More... | |
bool | log_flush_notifier_is_active () |
Checks if log flush notifier thread is active. More... | |
bool | log_write_to_file_requests_are_frequent (std::chrono::microseconds interval) |
Checks if requests to write redo log buffer to disk are frequent (which means that there is at least one request per 1ms in average). More... | |
bool | log_write_to_file_requests_are_frequent (const log_t &log) |
Checks if requests to write redo log buffer to disk are frequent (which means that there is at least one request per 1ms in average). More... | |
#define log_flush_notifier_mutex_enter | ( | log | ) | mutex_enter(&((log).flush_notifier_mutex)) |
#define log_flush_notifier_mutex_exit | ( | log | ) | mutex_exit(&((log).flush_notifier_mutex)) |
#define log_flush_notifier_mutex_own | ( | log | ) | (mutex_own(&((log).flush_notifier_mutex)) || !log_flush_notifier_is_active()) |
#define log_flusher_mutex_enter | ( | log | ) | mutex_enter(&((log).flusher_mutex)) |
#define log_flusher_mutex_enter_nowait | ( | log | ) | mutex_enter_nowait(&((log).flusher_mutex)) |
#define log_flusher_mutex_exit | ( | log | ) | mutex_exit(&((log).flusher_mutex)) |
#define log_flusher_mutex_own | ( | log | ) | (mutex_own(&((log).flusher_mutex)) || !log_flusher_is_active()) |
#define log_write_notifier_mutex_enter | ( | log | ) | mutex_enter(&((log).write_notifier_mutex)) |
#define log_write_notifier_mutex_exit | ( | log | ) | mutex_exit(&((log).write_notifier_mutex)) |
#define log_write_notifier_mutex_own | ( | log | ) | (mutex_own(&((log).write_notifier_mutex)) || !log_write_notifier_is_active()) |
#define log_writer_mutex_enter | ( | log | ) | mutex_enter(&((log).writer_mutex)) |
#define log_writer_mutex_enter_nowait | ( | log | ) | mutex_enter_nowait(&((log).writer_mutex)) |
#define log_writer_mutex_exit | ( | log | ) | mutex_exit(&((log).writer_mutex)) |
#define log_writer_mutex_own | ( | log | ) | (mutex_own(&((log).writer_mutex)) || !log_writer_is_active()) |
void log_background_write_threads_active_validate | ( | const log_t & | log | ) |
Validates that the log writer, flusher threads are active.
Used only to assert, that the state is correct.
[in] | log | redo log |
void log_control_writer_threads | ( | log_t & | log | ) |
Pause / resume the log writer, the log flusher, the log write notifier and the log flush notifier threads based on innodb_log_writer_threads value.
void log_flush_notifier | ( | log_t * | log_ptr | ) |
The log flush notifier thread routine.
[in,out] | log_ptr | pointer to redo log |
|
inline |
Checks if log flush notifier thread is active.
void log_flusher | ( | log_t * | log_ptr | ) |
The log flusher thread routine.
[in,out] | log_ptr | pointer to redo log |
|
inline |
Checks if log flusher thread is active.
uint64_t log_pending_flushes | ( | ) |
Number of currently pending redo log flushes (fsyncs in-progress).
uint64_t log_total_flushes | ( | ) |
Total number of redo log flushes (fsyncs) that have been started since the redo log system (log_sys) became initialized (.
void log_write_notifier | ( | log_t * | log_ptr | ) |
The log write notifier thread routine.
[in,out] | log_ptr | pointer to redo log |
|
inline |
Checks if log write notifier thread is active.
|
inline |
Checks if requests to write redo log buffer to disk are frequent (which means that there is at least one request per 1ms in average).
[in] | log | redo log |
|
inline |
Checks if requests to write redo log buffer to disk are frequent (which means that there is at least one request per 1ms in average).
[in] | interval | how often in average requests happen |
Wait_stats log_write_up_to | ( | log_t & | log, |
lsn_t | lsn, | ||
bool | flush_to_disk | ||
) |
Waits until the redo log is written up to a provided lsn.
[in] | log | redo log |
[in] | lsn | lsn to wait for |
[in] | flush_to_disk | true: wait until it is flushed |
void log_writer | ( | log_t * | log_ptr | ) |
The log writer thread routine.
[in,out] | log_ptr | pointer to redo log |
void log_writer_check_if_exited_extra_margin | ( | log_t & | log | ) |
Checks if the redo log writer exited extra margin.
To minimize flipping of log.m_writer_inside_extra_margin, the check assumes the very pessimistic scenario in which a next write of the log_writer thread, would be executed up to the current lsn.
Requirement: log.writer_mutex acquired and log.m_writer_inside_extra_margin is true, before calling this function.
[in,out] | log | redo log |
|
inline |
Checks if log writer thread is active.
void log_writer_thread_active_validate | ( | ) |
Validates that the log writer thread is active.
Used only to assert, that the state is correct.