52 size_t data_len)
const = 0;
249 size_t reserved_bytes_per_thread) = 0;
562 Lsn &start_lsn,
Lsn &end_lsn) = 0;
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4753
Definition: ha0sys_var_handler_interface.h:36
This Redo Log Handler interface provides an abstraction over the redo log persistence and publishing ...
Definition: log0handler_interface.h:42
static constexpr uint16_t MAX_KEY
We abstract the Log Metadata - the data associated with the whole Log, as opposed to the data stored ...
Definition: log0handler_interface.h:781
virtual Lsn align_down_to_known_boundary(Lsn lsn)=0
Each call to write_mtr(..., &start_lsn, &end_lsn), or create(start_lsn), declares start_lsn to be a b...
virtual Status do_not_need_smaller_than(Lsn needed_lsn)=0
virtual Status persist_smaller_than(Lsn end_lsn, Durability desired_guarantee=Durability::FULLY_PERSISTED, Origin origin=Origin::OTHER)=0
A synchronous request for the Redo Log Handler to promise that previously written data is durable at ...
virtual ~Handler_interface()=default
Performs any clean up (assumes stop_writing() was already called if start_writing() was)
virtual Status get_metadata(uint16_t key, Metadata_value &value)=0
Retrieves the previously stored metadata block for a given key.
Durability
Used by persist_smaller_than(...desired_guarantee) to let the caller specify the desired guarantee ab...
Definition: log0handler_interface.h:602
@ OUTLIVE_PROCESS
A lower level of durability, which only ensures that the data written, should survive,...
@ FULLY_PERSISTED
The default level of durability, which ensures that the data was safely written to a stable storage,...
static constexpr uint32_t METADATA_BLOCK_SIZE
Each metadata block has the same fixed size of 512 bytes.
Definition: log0handler_interface.h:784
virtual Capacity_estimate get_capacity_estimate()=0
Used by InnoDB to determine if page cleaning and checkpointing should be speed up,...
Origin
Used by persist_smaller_than(...origin) and persist_available(...origin) to let the caller specify th...
Definition: log0handler_interface.h:591
@ OTHER
The call occurs for some other reason.
@ PAGE_FLUSHING
The call occurs due to page cleaning activity.
@ TRX_COMMIT
The call occurs during transaction commit.
virtual void wait_for_space()=0
Called from a thread which wishes to pass no more than reserved_bytes_per_thread of data to write_mtr...
virtual Status start_writing(Lsn start_lsn)=0
Informs Redo Log Handler that the caller intends to start writing to the log.
virtual Status store_metadata(uint16_t key, const Metadata_value &value)=0
Persists synchronously the metadata atomically overwriting the old value for a given key.
virtual Status start_reading()=0
Informs the Redo Log Handler that InnoDB intends to start reading from the log.
virtual Sys_var_handler_interface & config_handler()=0
Returns the handler to configure the redo log related system variables.
virtual Lsn peek_first_nonpersisted_lsn()=0
Intuitively returns the largest end_lsn passed to a successfully finished persist_smaller_than(end_ls...
virtual Status persist_available(const Origin &origin=Origin::OTHER)=0
Similar to persist_smaller_than(end_lsn, origin), except that the caller politely asks the Redo Log H...
std::array< unsigned char, METADATA_BLOCK_SIZE > Metadata_value
Definition: log0handler_interface.h:785
virtual Capabilities get_capabilities()=0
Query the capabilities of the Redo Log Handler.
virtual Status create(Lsn start_lsn)=0
Request synchronous creation of Log starting at a given start_lsn.
virtual Lsn compute_end_lsn(Lsn start_lsn, size_t data_len) const =0
Returns the lsn at the requested position that is the end of the MTR data.
virtual Lsn peek_first_unassigned_lsn()=0
Intuitively returns the largest end_lsn assigned from an write_mtr(..,&end_lsn) call.
virtual Status write_mtr(const Const_buffers &mtr_data, Lsn &start_lsn, Lsn &end_lsn)=0
Request an asynchronous append of the mtr's body's bytes to the log.
virtual bool reconfigure(size_t max_threads, size_t reserved_bytes_per_thread)=0
InnoDB uses write_mtr(data,..) in mtr.commit() when a thread still holds latches on pages involved in...
virtual void stop_writing()=0
Informs Redo Log Handler that the caller no longer intends writing to the log.
virtual Status read(Lsn start_lsn, Buffer &buffer)=0
Reads previously persisted portion of the Log starting from start_lsn synchronously.
virtual bool has_space()=0
This is a no-wait variant of wait_for_space(), i.e.
void log_free_check()
A wrapper for ib::redo::handler->wait_for_space(), which should be used in InnoDB code,...
Definition: log0free_check.cc:62
Definition: log0common.h:32
Status
Additional error constants may be added to the list here, keeping in mind the following guidelines ab...
Definition: log0common.h:102
Handler_interface * handler
Definition: log0log.cc:434
uint64_t Lsn
Definition: log0common.h:60
std::span< uint8_t > Buffer
Definition: log0common.h:123
void set_handler(Handler_interface *handler)
Sets the concrete Redo Log Handler to be used.
Definition: log0log.cc:581
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: log0common.h:125
Definition: log0handler_interface.h:56
bool atomic_write
If true, then the implementation supports "atomic writes", which means that if any of the bytes passe...
Definition: log0handler_interface.h:71
bool supports_encryption
True if REDO log encryption is supported.
Definition: log0handler_interface.h:79
bool supports_disabling
Is ALTER INSTANCE DISABLE INNODB REDO_LOG supported?
Definition: log0handler_interface.h:77
bool supports_meb
MEB assumes direct access to files in specific location and format.
Definition: log0handler_interface.h:75
bool supports_clone
CLONE assumes direct access to files in specific location and format.
Definition: log0handler_interface.h:73
Describes the state of the capacity in sufficient detail that InnoDB knows if it should rush with pag...
Definition: log0handler_interface.h:256
Lsn margin_length
The length of the lsn range reserved by wait_for_space().
Definition: log0handler_interface.h:262
Lsn max_history_length
The estimated lower bound on the maximum difference between peek_first_unassigned_lsn() and oldest st...
Definition: log0handler_interface.h:260
Lsn soft_logical_capacity() const
The so called Soft Logical Capacity, which is the lower bound on the length of the lsn range this Han...
Definition: log0handler_interface.h:273
Debug utilities for Innobase.
static uint64_t lsn
Definition: xcom_base.cc:446