MySQL 9.1.0
Source Code Documentation
|
A wrapper for log events/packets. More...
#include <pipeline_interfaces.h>
Public Types | |
enum class | Pipeline_event_type { PEVENT_DATA_PACKET_TYPE_E = 1 , PEVENT_BINARY_LOG_EVENT_TYPE_E = 2 , PEVENT_APPLIER_ONLY_EVENT_E = 3 } |
Public Member Functions | |
Pipeline_event (Data_packet *base_packet, Format_description_log_event *fde_event, int modifier=UNDEFINED_EVENT_MODIFIER, enum_group_replication_consistency_level consistency_level=GROUP_REPLICATION_CONSISTENCY_EVENTUAL, Members_list *online_members=nullptr) | |
Create a new pipeline wrapper based on a packet. More... | |
Pipeline_event (Log_event *base_event, Format_description_log_event *fde_event, int modifier=UNDEFINED_EVENT_MODIFIER, enum_group_replication_consistency_level consistency_level=GROUP_REPLICATION_CONSISTENCY_EVENTUAL, Members_list *online_members=nullptr) | |
Create a new pipeline wrapper based on a log event. More... | |
Pipeline_event (Packet *packet, int modifier=UNDEFINED_EVENT_MODIFIER, enum_group_replication_consistency_level consistency_level=GROUP_REPLICATION_CONSISTENCY_EVENTUAL, Members_list *online_members=nullptr) | |
~Pipeline_event () | |
int | get_FormatDescription (Format_description_log_event **out_fde) |
Return current format description event. More... | |
int | get_LogEvent (Log_event **out_event) |
Return a log event. More... | |
Pipeline_event_type | get_pipeline_event_type () |
void | set_LogEvent (Log_event *in_event) |
Sets the pipeline event's log event. More... | |
void | set_Packet (Data_packet *in_packet) |
Sets the pipeline event's packet. More... | |
int | get_Packet (Data_packet **out_packet) |
Return a packet. More... | |
mysql::binlog::event::Log_event_type | get_event_type () |
Returns the event type. More... | |
void | mark_event (int modifier) |
Sets the event context flag. More... | |
int | get_event_context () |
Returns the event context flag. More... | |
void | reset_pipeline_event () |
Resets all variables in the event for reuse. More... | |
enum_group_replication_consistency_level | get_consistency_level () |
Get transaction consistency level. More... | |
Members_list * | get_online_members () |
Get the list of ONLINE Group members when a Transaction_with_guarantee_message message was received, or NULL if if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION. More... | |
Packet * | get_applier_event_packet () |
void | release_online_members_memory_ownership () |
Release memory ownership of m_online_members. More... | |
void | set_delayed_view_change_waiting_for_consistent_transactions () |
Set view change cannot be processed now and should be delayed due to consistent transaction. More... | |
bool | is_delayed_view_change_waiting_for_consistent_transactions () |
Check if current view change is delayed due to consistent transaction. More... | |
void | set_delayed_view_change_resumed () |
Allow resume the log of delayed views that were waiting for consistent transactions from previous view to complete. More... | |
bool | is_delayed_view_change_resumed () |
Check if old view change processing is resumed. More... | |
Private Types | |
enum class | Processing_state { DEFAULT , DELAYED_VIEW_CHANGE_WAITING_FOR_CONSISTENT_TRANSACTIONS , DELAYED_VIEW_CHANGE_RESUMED } |
Private Member Functions | |
int | convert_packet_to_log_event () |
Converts the existing packet into a log event. More... | |
int | convert_log_event_to_packet () |
Converts the existing log event into a packet. More... | |
A wrapper for log events/packets.
This class allows for the marking of events and its transformation between the packet and log event formats as requested in the interface.
|
strong |
|
strongprivate |
|
inline |
Create a new pipeline wrapper based on a packet.
UNDEFINED
[in] | base_packet | the wrapper packet |
[in] | fde_event | the format description event for conversions |
[in] | modifier | the event modifier |
[in] | consistency_level | the transaction consistency level |
[in] | online_members | the ONLINE members when the transaction message was delivered |
|
inline |
Create a new pipeline wrapper based on a log event.
UNDEFINED
[in] | base_event | the wrapper log event |
[in] | fde_event | the format description event for conversions |
[in] | modifier | the event modifier |
[in] | consistency_level | the transaction consistency level |
[in] | online_members | the ONLINE members when the transaction message was delivered |
|
inline |
|
inline |
|
inlineprivate |
Converts the existing log event into a packet.
0 | OK |
!=0 | Error on log event conversion |
|
inlineprivate |
Converts the existing packet into a log event.
0 | OK |
1 | Error on packet conversion |
|
inline |
|
inline |
Get transaction consistency level.
|
inline |
Returns the event context flag.
|
inline |
Returns the event type.
Be it a Log_event or Packet, it's marked with a type we can extract.
|
inline |
Return current format description event.
[out] | out_fde | the outputted format description event |
0 | OK |
|
inline |
Return a log event.
If one does not exist, the contained packet will be converted into one.
[out] | out_event | the outputted log event |
0 | OK |
!=0 | error on conversion |
|
inline |
Get the list of ONLINE Group members when a Transaction_with_guarantee_message message was received, or NULL if if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION.
For Transaction_message messages it always return NULL
|
inline |
Return a packet.
If one does not exist, the contained log event will be converted into one.
[out] | out_packet | the outputted packet |
0 | OK |
!=0 | error on conversion |
|
inline |
|
inline |
Check if old view change processing is resumed.
true | event is being processed from queue |
false | event is not being processed from queue |
|
inline |
Check if current view change is delayed due to consistent transaction.
true | event is being queued |
false | event is not being queued |
|
inline |
Sets the event context flag.
[in] | modifier | the event modifier |
|
inline |
Release memory ownership of m_online_members.
|
inline |
Resets all variables in the event for reuse.
Possible existing events/packets are deleted. The context flag is reset to UNDEFINED. Error messages are deleted.
Format description events, are NOT deleted. This is due to the fact that they are given, and do not belong to the pipeline event.
Transaction consistency level is not reset, despite the event is reset, consistency level belongs to the transaction.
|
inline |
Allow resume the log of delayed views that were waiting for consistent transactions from previous view to complete.
|
inline |
Set view change cannot be processed now and should be delayed due to consistent transaction.
|
inline |
Sets the pipeline event's log event.
[in] | in_event | the given log event |
|
inline |
Sets the pipeline event's packet.
[in] | in_packet | the given packet |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |