MySQL 8.4.0
Source Code Documentation
Communication_protocol_action Class Referencefinal

Action that changes the GCS protocol version in use by the group. More...

#include <communication_protocol_action.h>

Inheritance diagram for Communication_protocol_action:
[legend]

Public Member Functions

 Communication_protocol_action ()
 
 Communication_protocol_action (Gcs_protocol_version gcs_protocol)
 
 ~Communication_protocol_action () final
 
void get_action_message (Group_action_message **message) final
 Get the message with parameters to this action. More...
 
int process_action_message (Group_action_message &message, const std::string &message_origin) final
 
enum_action_execution_result execute_action (bool invoking_member, Plugin_stage_monitor_handler *stage_handler, Notification_context *) final
 Execute the action. More...
 
bool stop_action_execution (bool killed) final
 
Group_action_diagnosticsget_execution_info () final
 Gets the info about execution, be it success or failure. More...
 
- Public Member Functions inherited from Group_action
virtual ~Group_action ()=0
 
virtual PSI_stage_key get_action_stage_termination_key ()
 For this action, what is the PSI key for the last stage when the action is terminating. More...
 

Private Member Functions

int set_consensus_leaders () const
 

Private Attributes

Group_action_diagnostics m_diagnostics
 Stores textual information about the action's execution. More...
 
Gcs_protocol_version m_gcs_protocol
 The GCS protocol to change to. More...
 
std::future< void > m_protocol_change_done
 Future on which to wait for the protocol change to finish in the local node. More...
 

Additional Inherited Members

- Public Types inherited from Group_action
enum  enum_action_execution_result {
  GROUP_ACTION_RESULT_TERMINATED = 0 , GROUP_ACTION_RESULT_ERROR = 1 , GROUP_ACTION_RESULT_RESTART = 2 , GROUP_ACTION_RESULT_ABORTED = 3 ,
  GROUP_ACTION_RESULT_KILLED = 4 , GROUP_ACTION_RESULT_END = 5
}
 Enum for the end results of a action execution. More...
 

Detailed Description

Action that changes the GCS protocol version in use by the group.

Note that this action's logic is actually done in process_action_message instead of execute_action. This is because process_action_message is executed in the same logical instant on all group members (in the GCS thread) while execute_action is executed nondeterministically on its own thread.

Constructor & Destructor Documentation

◆ Communication_protocol_action() [1/2]

Communication_protocol_action::Communication_protocol_action ( )

◆ Communication_protocol_action() [2/2]

Communication_protocol_action::Communication_protocol_action ( Gcs_protocol_version  gcs_protocol)
explicit

◆ ~Communication_protocol_action()

Communication_protocol_action::~Communication_protocol_action ( )
finaldefault

Member Function Documentation

◆ execute_action()

Group_action::enum_action_execution_result Communication_protocol_action::execute_action ( bool  invoking_member,
Plugin_stage_monitor_handler stage_handler,
Notification_context  
)
finalvirtual

Execute the action.

Parameters
invoking_memberis the member that invoked it
stage_handlerthe stage handler to report progress
Returns
the execution result

Implements Group_action.

◆ get_action_message()

void Communication_protocol_action::get_action_message ( Group_action_message **  message)
finalvirtual

Get the message with parameters to this action.

Parameters
[out]messagethe message to start the action

Implements Group_action.

◆ get_execution_info()

Group_action_diagnostics * Communication_protocol_action::get_execution_info ( )
finalvirtual

Gets the info about execution, be it success or failure.

Returns
the execution diagnostics object that was the message and its level

Implements Group_action.

◆ process_action_message()

int Communication_protocol_action::process_action_message ( Group_action_message message,
const std::string &  message_origin 
)
finalvirtual

Implements Group_action.

◆ set_consensus_leaders()

int Communication_protocol_action::set_consensus_leaders ( ) const
private

◆ stop_action_execution()

bool Communication_protocol_action::stop_action_execution ( bool  killed)
finalvirtual

Implements Group_action.

Member Data Documentation

◆ m_diagnostics

Group_action_diagnostics Communication_protocol_action::m_diagnostics
private

Stores textual information about the action's execution.

◆ m_gcs_protocol

Gcs_protocol_version Communication_protocol_action::m_gcs_protocol
private

The GCS protocol to change to.

◆ m_protocol_change_done

std::future<void> Communication_protocol_action::m_protocol_change_done
private

Future on which to wait for the protocol change to finish in the local node.


The documentation for this class was generated from the following files: