MySQL 8.0.39
Source Code Documentation
|
Controls the execution flow when we compress the transaction cache into memory and write back the compressed data to the transaction cache. More...
Public Member Functions | |
Binlog_cache_compressor (THD &thd, binlog_cache_data &cache) | |
Construct a new Binlog_cache_compressor capable of compressing the given binlog_cache_data object. More... | |
Binlog_cache_compressor (const Binlog_cache_compressor &)=delete | |
Binlog_cache_compressor (Binlog_cache_compressor &&)=delete | |
Binlog_cache_compressor & | operator= (const Binlog_cache_compressor &)=delete |
Binlog_cache_compressor & | operator= (Binlog_cache_compressor &&)=delete |
~Binlog_cache_compressor () | |
bool | compress () |
Attempt to compress the transaction cache. More... | |
Private Member Functions | |
bool | shall_compress () |
Determine if compression should be attempted for the current transaction. More... | |
bool | setup_compressor () |
Get and configure the compressor; update m_compressor. More... | |
bool | setup_buffer_sequence () |
Get and configure the Managed_buffer_sequence; update m_managed_buffer_sequence. More... | |
bool | compress_to_buffer_sequence () |
Compress the transaction cache using the compressor, and and store the output in the Managed_buffer_sequence. More... | |
bool | get_payload_event_from_buffer_sequence (Transaction_payload_log_event &tple) |
Populate the given Transaction_payload_log_event with compressed data. More... | |
bool | overwrite_cache_with_payload_event (Transaction_payload_log_event &tple) |
Truncate the transaction cache and write the Transaction_payload_log_event there instead. More... | |
Private Attributes | |
THD & | m_thd |
Session context. More... | |
binlog_cache_data & | m_cache |
Transaction cache. More... | |
Binlog_cache_storage & | m_cache_storage |
Storage for the transaction cache. More... | |
Transaction_compression_ctx & | m_context |
Session compression context. More... | |
Transaction_compression_ctx::Compressor_ptr_t | m_compressor |
Compressor. More... | |
Transaction_compression_ctx::Managed_buffer_sequence_t & | m_managed_buffer_sequence |
Output buffer. More... | |
size_t | m_uncompressed_size |
Size before compression. More... | |
size_t | m_compressed_size |
Size after compression, if compression succeeded. More... | |
binary_log::transaction::compression::type | m_compression_type |
Compression algorithm, if compression succeded; otherwise NONE. More... | |
Controls the execution flow when we compress the transaction cache into memory and write back the compressed data to the transaction cache.
This is meant to be constructed once per transaction, and used once to compress an existing transaction cache. It relies on RAII to perform final actions in the destructor, so it should normally be constructed on the stack.
|
inline |
Construct a new Binlog_cache_compressor capable of compressing the given binlog_cache_data
object.
|
delete |
|
delete |
|
inline |
|
inline |
Attempt to compress the transaction cache.
false | The transaction cache is either unchanged, or has been successfully replaced by the compressed transaction. |
true | The transaction cache has been corrupted, e.g. because an IO error occurred while replacing it, so the transaction has to abort. |
|
inlineprivate |
Compress the transaction cache using the compressor, and and store the output in the Managed_buffer_sequence.
|
inlineprivate |
Populate the given Transaction_payload_log_event with compressed data.
|
delete |
|
delete |
|
inlineprivate |
Truncate the transaction cache and write the Transaction_payload_log_event there instead.
|
inlineprivate |
Get and configure the Managed_buffer_sequence; update m_managed_buffer_sequence.
|
inlineprivate |
Get and configure the compressor; update m_compressor.
|
inlineprivate |
Determine if compression should be attempted for the current transaction.
true | compression should be attempted |
false | compression should not be attempted |
|
private |
Transaction cache.
|
private |
Storage for the transaction cache.
|
private |
Size after compression, if compression succeeded.
Otherwise, size before compression.
|
private |
Compression algorithm, if compression succeded; otherwise NONE.
|
private |
Compressor.
|
private |
Session compression context.
|
private |
Output buffer.
|
private |
Session context.
|
private |
Size before compression.