MySQL 9.1.0
Source Code Documentation
|
In-memory dictionary of meta data of existing log files. More...
#include <log0files_dict.h>
Classes | |
class | Const_iterator |
Public Member Functions | |
Log_files_dict methods | |
Log_files_dict (Log_files_context &files_ctx) | |
Constructs an empty dictionary. More... | |
Log_files_dict (Log_files_dict &&other) | |
Log_files_dict & | operator= (Log_files_dict &&other) |
const Log_files_context & | ctx () const |
Const_iterator | find (lsn_t lsn) const |
Searches for an existing log file, that contains the provided lsn. More... | |
Const_iterator | file (Log_file_id file_id) const |
Provides log file for the given file id. More... | |
void | clear () |
Clears the whole dictionary. More... | |
void | erase (Log_file_id file_id) |
Removes the meta data about the given log file (which denotes the file does not exist anymore) from this data structure. More... | |
void | add (Log_file_id file_id, os_offset_t size_in_bytes, lsn_t start_lsn, bool full, bool consumed, Encryption_metadata &encryption_metadata) |
Add meta data for the existing log file. More... | |
void | add (Log_file_id file_id, os_offset_t size_in_bytes, lsn_t start_lsn, bool full, Encryption_metadata &encryption_metadata) |
Add meta data for the existing log file. More... | |
void | set_consumed (Log_file_id file_id) |
Marks a given log file as consumed. More... | |
void | set_full (Log_file_id file_id) |
Marks a given log file as full. More... | |
void | set_incomplete (Log_file_id file_id) |
Marks a given log file as incomplete (undo marking as full). More... | |
void | set_size (Log_file_id file_id, os_offset_t new_size) |
Changes size of the file. More... | |
bool | empty () const |
const Log_file & | front () const |
const Log_file & | back () const |
Log_files_dict::Const_iterator and related | |
Const_iterator | begin () const |
Const_iterator | end () const |
Private Types | |
using | Log_files_map = ut::map< Log_file_id, Log_file > |
using | Log_files_map_iterator = typename Log_files_map::const_iterator |
Private Attributes | |
const Log_files_context & | m_files_ctx |
Context within which log files exist. More... | |
Log_files_map | m_files_by_id |
Meta information about each existing redo log file. More... | |
In-memory dictionary of meta data of existing log files.
This is a plain data structure only. It has no dependency.
|
private |
|
private |
|
explicit |
Constructs an empty dictionary.
Log_files_dict::Log_files_dict | ( | Log_files_dict && | other | ) |
void Log_files_dict::add | ( | Log_file_id | file_id, |
os_offset_t | size_in_bytes, | ||
lsn_t | start_lsn, | ||
bool | full, | ||
bool | consumed, | ||
Encryption_metadata & | encryption_metadata | ||
) |
Add meta data for the existing log file.
It asserts that the meta data for that file has not been added yet to this data structure.
[in] | file_id | id of the log file |
[in] | size_in_bytes | size of the log file (in bytes) |
[in] | start_lsn | lsn of the first data byte in file |
[in] | full | true iff file is marked as full |
[in] | consumed | true iff file is marked as consumed |
[in] | encryption_metadata | encryption metadata |
void Log_files_dict::add | ( | Log_file_id | file_id, |
os_offset_t | size_in_bytes, | ||
lsn_t | start_lsn, | ||
bool | full, | ||
Encryption_metadata & | encryption_metadata | ||
) |
Add meta data for the existing log file.
It asserts that the meta data for that file has not been added yet to this data structure.
[in] | file_id | id of the log file |
[in] | size_in_bytes | size of the log file (in bytes) |
[in] | start_lsn | lsn of the first data byte in file |
[in] | full | true iff file is marked as full |
[in] | encryption_metadata | encryption metadata |
const Log_file & Log_files_dict::back | ( | ) | const |
Log_files_dict::Const_iterator Log_files_dict::begin | ( | void | ) | const |
void Log_files_dict::clear | ( | ) |
Clears the whole dictionary.
const Log_files_context & Log_files_dict::ctx | ( | ) | const |
bool Log_files_dict::empty | ( | ) | const |
Log_files_dict::Const_iterator Log_files_dict::end | ( | void | ) | const |
void Log_files_dict::erase | ( | Log_file_id | file_id | ) |
Removes the meta data about the given log file (which denotes the file does not exist anymore) from this data structure.
[in] | file_id | id of the log file |
Log_files_dict::Const_iterator Log_files_dict::file | ( | Log_file_id | file_id | ) | const |
Provides log file for the given file id.
[in] | file_id | id of the log file |
Log_files_dict::Const_iterator Log_files_dict::find | ( | lsn_t | lsn | ) | const |
Searches for an existing log file, that contains the provided lsn.
[in] | lsn | lsn to search for |
iterator | pointing to the log file if file has been found |
end() | if there was no file containing the provided lsn |
const Log_file & Log_files_dict::front | ( | ) | const |
Log_files_dict & Log_files_dict::operator= | ( | Log_files_dict && | other | ) |
void Log_files_dict::set_consumed | ( | Log_file_id | file_id | ) |
Marks a given log file as consumed.
[in] | file_id | id of the log file |
void Log_files_dict::set_full | ( | Log_file_id | file_id | ) |
Marks a given log file as full.
[in] | file_id | id of the log file |
void Log_files_dict::set_incomplete | ( | Log_file_id | file_id | ) |
Marks a given log file as incomplete (undo marking as full).
[in] | file_id | id of the log file |
void Log_files_dict::set_size | ( | Log_file_id | file_id, |
os_offset_t | new_size | ||
) |
Changes size of the file.
Updates m_end_lsn accordingly.
[in] | file_id | id of the log file |
[in] | new_size | new size (expressed in bytes) |
|
private |
Meta information about each existing redo log file.
|
private |
Context within which log files exist.