35#ifndef log0files_capacity_h 
   36#define log0files_capacity_h 
   65                  lsn_t current_checkpoint_age);
 
   78              lsn_t current_checkpoint_age);
 
  311                                           lsn_t current_logical_size) 
const;
 
  319                                lsn_t current_logical_size);
 
  330                               lsn_t current_logical_size);
 
  369                                   lsn_t &limit_for_free_check,
 
  370                                   lsn_t &limit_for_dirty_page_age);
 
Responsible for the redo log capacity computations.
Definition: log0files_capacity.h:56
 
void update_if_target_reached(const Log_files_dict &files, lsn_t current_logical_size)
Checks if target of the resize is reached with regards to all criteria and updates the m_resize_mode,...
Definition: log0files_capacity.cc:371
 
bool is_target_reached_for_physical_size(os_offset_t current_physical_size) const
Checks if target of the resize is reached, with regards to the criteria based on the current physical...
Definition: log0files_capacity.cc:342
 
lsn_t get_suggested_hard_logical_capacity(lsn_t current_checkpoint_age) const
Computes suggested value for the current hard logical capacity.
Definition: log0files_capacity.cc:455
 
lsn_t next_file_earlier_margin() const
Provides margin which might be used ahead of the newest lsn to create a next file earlier if needed (...
Definition: log0files_capacity.cc:554
 
bool is_target_reached_for_max_file_size(const Log_files_dict &files) const
Checks if target of the resize is reached, with regards to the criteria based on the largest existing...
Definition: log0files_capacity.cc:355
 
void update_exposed(lsn_t current_logical_size)
Updates cached and exposed values related to the logical redo capacity:
Definition: log0files_capacity.cc:475
 
static lsn_t hard_logical_capacity_for_physical(os_offset_t physical_capacity)
Computes hard logical capacity, that corresponds to the provided physical capacity of the redo log (.
Definition: log0files_capacity.cc:273
 
Log_resize_mode m_resize_mode
Current resize direction.
Definition: log0files_capacity.h:274
 
void initialize(const Log_files_dict &files, lsn_t current_logical_size, lsn_t current_checkpoint_age)
Initialize on discovered set of redo log files (empty set if new redo is being created).
Definition: log0files_capacity.cc:151
 
lsn_t soft_logical_capacity() const
Soft limit for logical capacity of the redo log.
Definition: log0files_capacity.cc:505
 
os_offset_t target_physical_capacity() const
If a redo downsize is in progress, it is the targeted value for the current_physical_capacity() (is e...
Definition: log0files_capacity.cc:525
 
Exposed m_exposed
Cache for values returned by getters in this object, which otherwise would need to be computed on-dem...
Definition: log0files_capacity.h:253
 
void update_status_variables(const Log_files_dict &files, lsn_t current_logical_size)
Updates values of server status variables: innodb_redo_log_capacity_resized, innodb_redo_log_logical_...
Definition: log0files_capacity.cc:389
 
bool is_resizing_down() const
Definition: log0files_capacity.cc:521
 
static lsn_t sync_flush_logical_capacity_for_soft(lsn_t soft_logical_capacity)
Computes maximum age of dirty pages up to which there is no sync flush enforced on page cleaners.
Definition: log0files_capacity.cc:447
 
static lsn_t soft_logical_capacity_for_hard(lsn_t hard_logical_capacity)
Computes soft logical capacity, that corresponds to the provided hard logical capacity of the redo lo...
Definition: log0files_capacity.cc:431
 
static lsn_t guess_soft_logical_capacity_for_sync_flush(lsn_t adaptive_flush_max_age)
Computes soft logical capacity, that corresponds to the provided maximum age of dirty pages up to whi...
Definition: log0files_capacity.cc:439
 
lsn_t aggressive_checkpoint_min_age() const
Once checkpoint age exceeds that value, the log checkpointer thread keeps writing checkpoints aggress...
Definition: log0files_capacity.cc:517
 
bool is_target_reached_for_logical_size(lsn_t current_logical_size) const
Checks if target of the resize is reached, with regards to the criteria based on the current logical ...
Definition: log0files_capacity.cc:335
 
void update_target()
Updates m_target_physical_capacity (reading srv_redo_log_capacity_used) and possibly starts a new dow...
Definition: log0files_capacity.cc:226
 
void update(const Log_files_dict &files, lsn_t current_logical_size, lsn_t current_checkpoint_age)
Updates all internal limits according to the provided parameters.
Definition: log0files_capacity.cc:190
 
static lsn_t guess_hard_logical_capacity_for_soft(lsn_t soft_logical_capacity)
Computes hard logical capacity, that corresponds to the provided soft logical capacity of the redo lo...
Definition: log0files_capacity.cc:423
 
bool is_target_reached_for_resizing_down(const Log_files_dict &files, lsn_t current_logical_size) const
Checks if target of the resize is reached.
Definition: log0files_capacity.cc:363
 
os_offset_t m_target_physical_capacity
Goal we are trying to achieve for m_current_physical_capacity when resize operation is in progress,...
Definition: log0files_capacity.h:267
 
os_offset_t current_physical_capacity() const
Provides maximum limitation for space occupied on disk.
Definition: log0files_capacity.cc:529
 
lsn_t hard_logical_capacity() const
Hard limit for logical capacity of the redo log.
Definition: log0files_capacity.cc:501
 
void cancel_resize()
Cancels current resize operation immediately.
Definition: log0files_capacity.cc:215
 
lsn_t adaptive_flush_min_age() const
Once checkpoint age exceeds this value, the flushing of pages starts to be adaptive.
Definition: log0files_capacity.cc:509
 
os_offset_t m_current_physical_capacity
This is limitation for space on disk we are never allowed to exceed.
Definition: log0files_capacity.h:259
 
void update_resize_status_variable()
Updates value of server status variable: innodb_redo_log_resize_status.
Definition: log0files_capacity.cc:406
 
lsn_t adaptive_flush_max_age() const
Once checkpoint age exceeds that value, the flushing of pages is the most aggressive possible since t...
Definition: log0files_capacity.cc:513
 
os_offset_t next_file_size() const
Provides size of the next redo log file that will be created.
Definition: log0files_capacity.cc:533
 
In-memory dictionary of meta data of existing log files.
Definition: log0files_dict.h:57
 
void log_files_capacity_get_limits(const log_t &log, lsn_t &limit_for_free_check, lsn_t &limit_for_dirty_page_age)
Retrieves limitations determined by the current state of log.m_capacity.
Definition: log0files_capacity.cc:124
 
In-memory dictionary of log files (keeps their meta data).
 
Log_resize_mode
Direction of resize operation.
Definition: log0types.h:193
 
std::atomic< lsn_t > atomic_lsn_t
Alias for atomic based on lsn_t.
Definition: log0types.h:82
 
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
 
The interface to the operating system file io.
 
uint64_t os_offset_t
File offset in bytes.
Definition: os0file.h:87
 
Definition: log0files_capacity.h:232
 
atomic_lsn_t m_agressive_checkpoint_min_age
Value returned by.
Definition: log0files_capacity.h:246
 
atomic_lsn_t m_hard_logical_capacity
Value returned by.
Definition: log0files_capacity.h:237
 
atomic_lsn_t m_soft_logical_capacity
Value returned by.
Definition: log0files_capacity.h:234
 
atomic_lsn_t m_adaptive_flush_max_age
Value returned by.
Definition: log0files_capacity.h:243
 
atomic_lsn_t m_adaptive_flush_min_age
Value returned by.
Definition: log0files_capacity.h:240
 
Redo log - single data structure with state of the redo log system.
Definition: log0sys.h:77