#include <log0log.h>
Public Attributes | |
byte | pad [64] |
ib_uint64_t | lsn |
ulint | buf_free |
mutex_t | mutex |
mutex_t | log_flush_order_mutex |
byte * | buf_ptr |
byte * | buf |
ulint | buf_size |
ulint | max_buf_free |
ulint | old_buf_free |
ib_uint64_t | old_lsn |
ibool | check_flush_or_checkpoint |
log_groups | |
ulint | buf_next_to_write |
ib_uint64_t | written_to_some_lsn |
ib_uint64_t | written_to_all_lsn |
ib_uint64_t | write_lsn |
ulint | write_end_offset |
ib_uint64_t | current_flush_lsn |
ib_uint64_t | flushed_to_disk_lsn |
ulint | n_pending_writes |
os_event_t | no_flush_event |
ibool | one_flushed |
os_event_t | one_flushed_event |
ulint | n_log_ios |
ulint | n_log_ios_old |
time_t | last_printout_time |
ulint | log_group_capacity |
ulint | max_modified_age_async |
ulint | max_modified_age_sync |
ulint | adm_checkpoint_interval |
ulint | max_checkpoint_age_async |
ulint | max_checkpoint_age |
ib_uint64_t | next_checkpoint_no |
ib_uint64_t | last_checkpoint_lsn |
ib_uint64_t | next_checkpoint_lsn |
ulint | n_pending_checkpoint_writes |
rw_lock_t | checkpoint_lock |
byte * | checkpoint_buf_ptr |
byte * | checkpoint_buf |
administrator-specified checkpoint interval in terms of log growth in bytes; the interval actually used by the database can be smaller
Definition at line 896 of file log0log.h.
Referenced by log_init().
byte* log_struct::buf |
log buffer
Definition at line 777 of file log0log.h.
Referenced by log_close(), log_init(), log_write_low(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ulint log_struct::buf_free |
first free offset within the log buffer
Definition at line 762 of file log0log.h.
Referenced by log_close(), log_init(), log_reserve_and_open(), log_write_low(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
The fields involved in the log buffer flush first offset in the log buffer where the byte content may not exist written to file, e.g., the start offset of a log record catenated later; this is advanced when a flush operation is completed to all the log groups
Definition at line 803 of file log0log.h.
Referenced by log_init(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ulint log_struct::buf_size |
log buffer size in bytes
Definition at line 778 of file log0log.h.
Referenced by log_init(), log_reserve_and_open(), and log_write_low().
this is set to TRUE when there may be need to flush the log buffer, or preflush buffer pool pages, or make a checkpoint; this MUST be TRUE when lsn - last_checkpoint_lsn > max_checkpoint_age; this flag is peeked at by log_free_check(), which does not reserve the log mutex
Definition at line 789 of file log0log.h.
Referenced by log_check_margins(), log_close(), and log_init().
checkpoint header is read to this buffer
Definition at line 924 of file log0log.h.
Referenced by log_group_read_checkpoint_info(), log_init(), and recv_recovery_from_checkpoint_start_func().
this latch is x-locked when a checkpoint write is running; a thread should wait for this without owning the log mutex
Definition at line 918 of file log0log.h.
Referenced by log_checkpoint(), and log_init().
ib_uint64_t log_struct::current_flush_lsn |
end lsn for the current running write + flush operation
Definition at line 839 of file log0log.h.
Referenced by log_init(), and log_write_up_to().
ib_uint64_t log_struct::flushed_to_disk_lsn |
how far we have written the log AND flushed to disk
Definition at line 842 of file log0log.h.
Referenced by log_checkpoint(), log_init(), log_print(), and log_write_up_to().
ib_uint64_t log_struct::last_checkpoint_lsn |
latest checkpoint lsn
Definition at line 912 of file log0log.h.
Referenced by log_checkpoint(), log_close(), log_init(), log_print(), logs_empty_and_mark_files_at_shutdown(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
when log_print was last time called
Definition at line 873 of file log0log.h.
Referenced by log_init(), log_print(), and log_refresh_stats().
mutex to serialize access to the flush list when we are putting dirty blocks in the list. The idea behind this mutex is to be able to release log_sys->mutex during mtr_commit and still ensure that insertions in the flush_list happen in the LSN order.
Definition at line 768 of file log0log.h.
Referenced by log_init().
Fields involved in checkpoints capacity of the log group; if the checkpoint age exceeds this, it is a serious error because it is possible we will then overwrite log and spoil crash recovery
Definition at line 878 of file log0log.h.
Referenced by log_close().
log groups
Definition at line 798 of file log0log.h.
Referenced by log_group_init(), log_groups_write_checkpoint_info(), log_init(), log_write_up_to(), logs_empty_and_mark_files_at_shutdown(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ib_uint64_t log_struct::lsn |
log sequence number
Definition at line 761 of file log0log.h.
Referenced by log_buffer_flush_to_disk(), log_buffer_sync_in_background(), log_close(), log_init(), log_peek_lsn(), log_print(), log_reserve_and_open(), log_write_low(), log_write_up_to(), logs_empty_and_mark_files_at_shutdown(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ulint log_struct::max_buf_free |
recommended maximum value of buf_free, after which the buffer is flushed
Definition at line 779 of file log0log.h.
Referenced by log_close(), and log_init().
when this checkpoint age is exceeded we start an asynchronous writing of a new checkpoint
Definition at line 901 of file log0log.h.
Referenced by log_close().
when this recommended value for lsn - buf_pool_get_oldest_modification() is exceeded, we start an asynchronous preflush of pool pages
Definition at line 884 of file log0log.h.
Referenced by log_close().
when this recommended value for lsn - buf_pool_get_oldest_modification() is exceeded, we start a synchronous preflush of pool pages
mutex protecting the log
Definition at line 765 of file log0log.h.
Referenced by innobase_start_or_create_for_mysql(), log_buffer_flush_to_disk(), log_buffer_sync_in_background(), log_check_margins(), log_checkpoint(), log_close(), log_fsp_current_free_limit_set_and_checkpoint(), log_group_get_capacity(), log_group_read_checkpoint_info(), log_group_read_log_seg(), log_group_write_buf(), log_groups_write_checkpoint_info(), log_init(), log_io_complete(), log_peek_lsn(), log_print(), log_reserve_and_open(), log_write_low(), log_write_up_to(), logs_empty_and_mark_files_at_shutdown(), recv_apply_hashed_log_recs(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ulint log_struct::n_log_ios |
number of log i/os initiated thus far
Definition at line 869 of file log0log.h.
Referenced by log_group_read_checkpoint_info(), log_group_read_log_seg(), log_group_write_buf(), log_init(), log_print(), log_refresh_stats(), and srv_master_thread().
number of log i/o's at the previous printout
Definition at line 871 of file log0log.h.
Referenced by log_init(), log_print(), and log_refresh_stats().
number of currently pending checkpoint writes
Definition at line 916 of file log0log.h.
Referenced by log_checkpoint(), log_init(), log_print(), and logs_empty_and_mark_files_at_shutdown().
number of currently pending flushes or writes
Definition at line 844 of file log0log.h.
Referenced by log_init(), log_io_complete(), log_print(), log_write_up_to(), logs_empty_and_mark_files_at_shutdown(), and srv_master_thread().
ib_uint64_t log_struct::next_checkpoint_lsn |
next checkpoint lsn
Definition at line 914 of file log0log.h.
Referenced by log_checkpoint(), and recv_recovery_from_checkpoint_start_func().
ib_uint64_t log_struct::next_checkpoint_no |
next checkpoint number
Definition at line 910 of file log0log.h.
Referenced by log_checkpoint(), log_init(), log_write_low(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
this event is in the reset state when a flush or a write is running; a thread should wait for this without owning the log mutex, but NOTE that to set or reset this event, the thread MUST own the log mutex!
Definition at line 850 of file log0log.h.
Referenced by log_init(), and log_write_up_to().
ulint log_struct::old_buf_free |
value of buf free when log was last time opened; only in the debug version
Definition at line 782 of file log0log.h.
Referenced by log_close(), and log_reserve_and_open().
ib_uint64_t log_struct::old_lsn |
value of lsn when log was last time opened; only in the debug version
Definition at line 785 of file log0log.h.
Referenced by log_close(), and log_reserve_and_open().
ibool log_struct::one_flushed |
during a flush, this is first FALSE and becomes TRUE when one log group has been written or flushed
Definition at line 856 of file log0log.h.
Referenced by log_write_up_to().
this event is reset when the flush or write has not yet completed for any log group; e.g., this means that a transaction has been committed when this is set; a thread should wait for this without owning the log mutex, but NOTE that to set or reset this event, the thread MUST own the log mutex!
Definition at line 860 of file log0log.h.
Referenced by log_init(), and log_write_up_to().
byte log_struct::pad[64] |
the data in buffer has been written up to this offset when the current write ends: this field will then be copied to buf_next_to_write
Definition at line 834 of file log0log.h.
Referenced by log_write_up_to().
ib_uint64_t log_struct::write_lsn |
end lsn for the current running write
Definition at line 832 of file log0log.h.
Referenced by log_init(), and log_write_up_to().
ib_uint64_t log_struct::written_to_all_lsn |
first log sequence number not yet written to some log group; for this to be advanced, it is enough that the write i/o has been completed for all log groups. Note that since InnoDB currently has only one log group therefore this value is redundant. Also it is possible that this value falls behind the flushed_to_disk_lsn transiently. It is appropriate to use either flushed_to_disk_lsn or write_lsn which are always up-to-date and accurate.
Definition at line 817 of file log0log.h.
Referenced by log_init(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().
ib_uint64_t log_struct::written_to_some_lsn |
first log sequence number not yet written to any log group; for this to be advanced, it is enough that the write i/o has been completed for any one log group
Definition at line 811 of file log0log.h.
Referenced by log_init(), log_write_up_to(), recv_recovery_from_checkpoint_start_func(), and recv_reset_logs().