133#define log_flusher_mutex_enter(log) mutex_enter(&((log).flusher_mutex))
135#define log_flusher_mutex_enter_nowait(log) \
136 mutex_enter_nowait(&((log).flusher_mutex))
138#define log_flusher_mutex_exit(log) mutex_exit(&((log).flusher_mutex))
140#define log_flusher_mutex_own(log) \
141 (mutex_own(&((log).flusher_mutex)) || !log_flusher_is_active())
143#define log_flush_notifier_mutex_enter(log) \
144 mutex_enter(&((log).flush_notifier_mutex))
146#define log_flush_notifier_mutex_exit(log) \
147 mutex_exit(&((log).flush_notifier_mutex))
149#define log_flush_notifier_mutex_own(log) \
150 (mutex_own(&((log).flush_notifier_mutex)) || !log_flush_notifier_is_active())
152#define log_writer_mutex_enter(log) mutex_enter(&((log).writer_mutex))
154#define log_writer_mutex_enter_nowait(log) \
155 mutex_enter_nowait(&((log).writer_mutex))
157#define log_writer_mutex_exit(log) mutex_exit(&((log).writer_mutex))
159#define log_writer_mutex_own(log) \
160 (mutex_own(&((log).writer_mutex)) || !log_writer_is_active())
162#define log_write_notifier_mutex_enter(log) \
163 mutex_enter(&((log).write_notifier_mutex))
165#define log_write_notifier_mutex_exit(log) \
166 mutex_exit(&((log).write_notifier_mutex))
168#define log_write_notifier_mutex_own(log) \
169 (mutex_own(&((log).write_notifier_mutex)) || !log_write_notifier_is_active())
200 std::chrono::microseconds
interval) {
201 return interval < std::chrono::milliseconds{1};
217#define log_writer_mutex_own(log) true
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:62
bool log_writer_is_active()
Checks if log writer thread is active.
Definition: log0write.h:173
void log_flusher(log_t *log_ptr)
The log flusher thread routine.
Definition: log0write.cc:2488
bool log_flush_notifier_is_active()
Checks if log flush notifier thread is active.
Definition: log0write.h:191
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 thr...
Definition: log0log.cc:1100
void log_write_notifier(log_t *log_ptr)
The log write notifier thread routine.
Definition: log0write.cc:2625
bool log_flusher_is_active()
Checks if log flusher thread is active.
Definition: log0write.h:185
void log_writer_thread_active_validate()
Validates that the log writer thread is active.
Definition: log0log.cc:870
uint64_t log_total_flushes()
Total number of redo log flushes (fsyncs) that have been started since the redo log system (log_sys) ...
Definition: log0write.cc:2410
bool log_write_notifier_is_active()
Checks if log write notifier thread is active.
Definition: log0write.h:179
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.
Definition: log0write.cc:1084
void log_background_write_threads_active_validate(const log_t &log)
Validates that the log writer, flusher threads are active.
Definition: log0log.cc:872
void log_writer_check_if_exited_extra_margin(log_t &log)
Checks if the redo log writer exited extra margin.
Definition: log0write.cc:1875
void log_writer(log_t *log_ptr)
The log writer thread routine.
Definition: log0write.cc:2223
void log_flush_notifier(log_t *log_ptr)
The log flush notifier thread routine.
Definition: log0write.cc:2747
uint64_t log_pending_flushes()
Number of currently pending redo log flushes (fsyncs in-progress).
Definition: log0write.cc:2412
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 ...
Definition: log0write.h:199
static int interval
Definition: mysqladmin.cc:69
bool srv_thread_is_active(const IB_thread &thread)
Check if given thread is still active.
Definition: srv0srv.cc:3254
Srv_threads srv_threads
Structure with state of srv background threads.
Definition: srv0srv.cc:102
IB_thread m_log_flush_notifier
Redo flush notifier thread.
Definition: srv0srv.h:186
IB_thread m_log_flusher
Redo flusher thread.
Definition: srv0srv.h:180
IB_thread m_log_write_notifier
Redo write notifier thread.
Definition: srv0srv.h:183
IB_thread m_log_writer
Redo writer thread.
Definition: srv0srv.h:177
Redo log - single data structure with state of the redo log system.
Definition: log0sys.h:76
std::atomic< std::chrono::microseconds > write_to_file_requests_interval
How often redo write/flush is requested in average.
Definition: log0sys.h:200
static uint64_t lsn
Definition: xcom_base.cc:445