35#ifndef log0files_capacity_h
36#define log0files_capacity_h
65 lsn_t current_checkpoint_age);
78 lsn_t current_checkpoint_age);
269 lsn_t current_logical_size)
const;
277 lsn_t current_logical_size);
288 lsn_t current_logical_size);
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:344
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:315
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:428
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:500
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:328
void update_exposed(lsn_t current_logical_size)
Updates cached and exposed values related to the logical redo capacity:
Definition: log0files_capacity.cc:448
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:246
Log_resize_mode m_resize_mode
Current resize direction.
Definition: log0files_capacity.h:232
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:124
lsn_t soft_logical_capacity() const
Soft limit for logical capacity of the redo log.
Definition: log0files_capacity.cc:463
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:471
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:211
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:362
bool is_resizing_down() const
Definition: log0files_capacity.cc:467
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:420
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:404
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:412
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:308
void update_target()
Updates m_target_physical_capacity (reading srv_redo_log_capacity_used) and possibly starts a new dow...
Definition: log0files_capacity.cc:199
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:163
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:396
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:336
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:225
os_offset_t current_physical_capacity() const
Provides maximum limitation for space occupied on disk.
Definition: log0files_capacity.cc:475
lsn_t hard_logical_capacity() const
Hard limit for logical capacity of the redo log.
Definition: log0files_capacity.cc:459
void cancel_resize()
Cancels current resize operation immediately.
Definition: log0files_capacity.cc:188
os_offset_t m_current_physical_capacity
This is limitation for space on disk we are never allowed to exceed.
Definition: log0files_capacity.h:217
void update_resize_status_variable()
Updates value of server status variable: innodb_redo_log_resize_status.
Definition: log0files_capacity.cc:379
os_offset_t next_file_size() const
Provides size of the next redo log file that will be created.
Definition: log0files_capacity.cc:479
In-memory dictionary of meta data of existing log files.
Definition: log0files_dict.h:57
static lsn_t adaptive_flush_max_age(lsn_t soft_logical_capacity)
Definition: log0chkp.cc:658
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:199
atomic_lsn_t m_hard_logical_capacity
Value returned by.
Definition: log0files_capacity.h:204
atomic_lsn_t m_soft_logical_capacity
Value returned by.
Definition: log0files_capacity.h:201