![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
Class that contains the primary election process logic for secondary members. More...
#include <primary_election_secondary_process.h>
Public Member Functions | |
| Primary_election_secondary_process () | |
| Class constructor for secondary election process.  More... | |
| ~Primary_election_secondary_process () override | |
| Class destructor for secondary election process.  More... | |
| int | launch_secondary_election_process (enum_primary_election_mode election_mode, std::string &primary_to_elect, Group_member_info_list *group_members_info) | 
| Launch the local process on the secondary members for primary election.  More... | |
| bool | is_election_process_running () | 
| Is the election process running?  More... | |
| int | terminate_election_process (bool wait=true) | 
| Terminate the election process on shutdown.  More... | |
| int | secondary_election_process_handler () | 
| void | set_stop_wait_timeout (ulong timeout) | 
| Sets the component stop timeout.  More... | |
  Public Member Functions inherited from Group_event_observer | |
| virtual | ~Group_event_observer ()=0 | 
Private Member Functions | |
| int | after_view_change (const std::vector< Gcs_member_identifier > &joining, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &group, bool is_leaving, bool *skip_election, enum_primary_election_mode *election_mode, std::string &suggested_primary) override | 
| Executed after view install and before primary election.  More... | |
| int | after_primary_election (std::string primary_uuid, enum_primary_election_primary_change_status primary_change_status, enum_primary_election_mode election_mode, int error) override | 
| Executed after primary election.  More... | |
| int | before_message_handling (const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message) override | 
| Executed before the message is processed.  More... | |
| bool | enable_read_mode_on_server () | 
| Enables the read mode in the server.  More... | |
| bool | signal_read_mode_ready () | 
| Signal that the read mode is ready on this member.  More... | |
Private Attributes | |
| thread_state | election_process_thd_state | 
| The election thread status.  More... | |
| bool | election_process_aborted | 
| Is the process aborted.  More... | |
| bool | waiting_on_old_primary_transactions | 
| Waiting for old primary transaction execution.  More... | |
| bool | primary_ready | 
| bool | group_in_read_mode | 
| Are all group members in read mode.  More... | |
| bool | is_waiting_on_read_mode_group | 
| Process is waiting on read mode - stage related var.  More... | |
| enum_primary_election_mode | election_mode | 
| The election invocation context.  More... | |
| std::string | primary_uuid | 
| The primary to be elected.  More... | |
| ulong | number_of_know_members | 
| The number of known members when the election started.  More... | |
| std::list< std::string > | known_members_addresses | 
| The members known for the current action.  More... | |
| Plugin_stage_monitor_handler * | stage_handler | 
| The stage handler for progress reporting.  More... | |
| ulong | stop_wait_timeout | 
| mysql_mutex_t | election_lock | 
| The thread run lock.  More... | |
| mysql_cond_t | election_cond | 
| The thread run condition.  More... | |
| my_thread_handle | primary_election_pthd | 
| The thread handle.  More... | |
Class that contains the primary election process logic for secondary members.
| Primary_election_secondary_process::Primary_election_secondary_process | ( | ) | 
Class constructor for secondary election process.
      
  | 
  override | 
Class destructor for secondary election process.
      
  | 
  overrideprivatevirtual | 
Executed after primary election.
| primary_uuid | the elected primary | 
| primary_change_status | if the primary changed after the election | 
| election_mode | what was the election mode | 
| error | if there was and error on the process | 
Implements Group_event_observer.
      
  | 
  overrideprivatevirtual | 
Executed after view install and before primary election.
| joining | members joining the group | |
| leaving | members leaving the group | |
| group | members in the group | |
| is_leaving | is the member leaving | |
| [out] | skip_election | skip primary election on view | 
| [out] | election_mode | election mode | 
| [out] | suggested_primary | what should be the next primary to elect | 
Implements Group_event_observer.
      
  | 
  overrideprivatevirtual | 
Executed before the message is processed.
| message | The GCS message | |
| message_origin | The member that sent this message (address) | |
| [out] | skip_message | skip message handling if true | 
Implements Group_event_observer.
      
  | 
  private | 
Enables the read mode in the server.
| bool Primary_election_secondary_process::is_election_process_running | ( | ) | 
Is the election process running?
| int Primary_election_secondary_process::launch_secondary_election_process | ( | enum_primary_election_mode | election_mode, | 
| std::string & | primary_to_elect, | ||
| Group_member_info_list * | group_members_info | ||
| ) | 
Launch the local process on the secondary members for primary election.
| election_mode | the context on which election is occurring | 
| primary_to_elect | the uuid of the primary to elect | 
| group_members_info | the member info about group members | 
| int Primary_election_secondary_process::secondary_election_process_handler | ( | ) | 
| void Primary_election_secondary_process::set_stop_wait_timeout | ( | ulong | timeout | ) | 
Sets the component stop timeout.
| [in] | timeout | the timeout | 
      
  | 
  private | 
Signal that the read mode is ready on this member.
| int Primary_election_secondary_process::terminate_election_process | ( | bool | wait = true | ) | 
Terminate the election process on shutdown.
      
  | 
  private | 
The thread run condition.
      
  | 
  private | 
The thread run lock.
      
  | 
  private | 
The election invocation context.
      
  | 
  private | 
Is the process aborted.
      
  | 
  private | 
The election thread status.
      
  | 
  private | 
Are all group members in read mode.
      
  | 
  private | 
Process is waiting on read mode - stage related var.
      
  | 
  private | 
The members known for the current action.
      
  | 
  private | 
The number of known members when the election started.
      
  | 
  private | 
The thread handle.
      
  | 
  private | 
      
  | 
  private | 
The primary to be elected.
      
  | 
  private | 
The stage handler for progress reporting.
      
  | 
  private | 
      
  | 
  private | 
Waiting for old primary transaction execution.