#include <gcs_xcom_group_management.h>
◆ Gcs_xcom_group_management() [1/2]
◆ ~Gcs_xcom_group_management()
Gcs_xcom_group_management::~Gcs_xcom_group_management |
( |
| ) |
|
|
override |
◆ Gcs_xcom_group_management() [2/2]
◆ get_leaders()
Inspect the group's "consensus leader" configuration.
- Parameters
-
[out] | preferred_leaders | The members specified as preferred leaders. |
[out] | actual_leaders | The members actually carrying out the leader role at this moment. |
- Return values
-
GCS_OK | if successful, preferred_leaders and actual_leaders contain the result |
GCS_NOK | if unsuccessful |
Implements Gcs_group_management_interface.
◆ get_maximum_write_concurrency()
uint32_t Gcs_xcom_group_management::get_maximum_write_concurrency |
( |
| ) |
const |
|
overridevirtual |
◆ get_minimum_write_concurrency()
uint32_t Gcs_xcom_group_management::get_minimum_write_concurrency |
( |
| ) |
const |
|
overridevirtual |
◆ get_write_concurrency()
enum_gcs_error Gcs_xcom_group_management::get_write_concurrency |
( |
uint32_t & |
write_concurrency | ) |
const |
|
overridevirtual |
Retrieves the group's "write concurrency" value.
- Parameters
-
[out] | write_concurrency | A reference to where the group's "write concurrency" value will be written to |
- Return values
-
GCS_OK | if successful and write_concurrency has been written to |
GCS_NOK | if GCS was unable to request the current "write concurrency" value from the underlying implementation |
Implements Gcs_group_management_interface.
◆ get_xcom_nodes() [1/3]
◆ get_xcom_nodes() [2/3]
◆ get_xcom_nodes() [3/3]
void Gcs_xcom_group_management::get_xcom_nodes |
( |
Gcs_xcom_nodes & |
result_xcom_nodes, |
|
|
const std::vector< std::string > & |
filter |
|
) |
| |
◆ modify_configuration()
Method that allows sending of a new group configuration.
This is to be used when the group is blocked due to a loss of majority and only on one node from the new group.
Implementations in each binding might have there specificities but some rules must be followed:
- This should be a non-blocking call;
- Typically, it shall cause a View Change, since we are forcing a new configuration.
- Parameters
-
[in] | reconfigured_group | a list containing the new nodes |
Implements Gcs_group_management_interface.
◆ operator=()
◆ set_everyone_leader()
Reconfigures the group's "consensus leaders.".
Instructs the underlying GCS to use every member as a consensus leader.
- Return values
-
GCS_OK | if successful |
GCS_NOK | if unsuccessful |
Implements Gcs_group_management_interface.
◆ set_single_leader()
Reconfigures the group's "consensus leaders.".
Instructs the underlying GCS to use leader
as the single preferred consensus leader.
- Parameters
-
leader | The member you desire to act as a consensus leader. |
- Return values
-
GCS_OK | if successful |
GCS_NOK | if unsuccessful |
Implements Gcs_group_management_interface.
◆ set_write_concurrency()
enum_gcs_error Gcs_xcom_group_management::set_write_concurrency |
( |
uint32_t |
write_concurrency | ) |
|
|
overridevirtual |
Reconfigures the group's "write concurrency" value.
The caller should ensure that the supplied value is between minimum_write_concurrency
and maximum_write_concurrency
.
The method is non-blocking, meaning that it shall only send the request to an underlying GCS. The final result can be polled via get_write_concurrency
.
- Parameters
-
write_concurrency | The desired "write concurrency" value. |
- Return values
-
GCS_OK | if successful |
GCS_NOK | if unsuccessful |
Implements Gcs_group_management_interface.
◆ set_xcom_nodes()
void Gcs_xcom_group_management::set_xcom_nodes |
( |
const Gcs_xcom_nodes & |
xcom_nodes | ) |
|
Save information on the latest nodes seen by this node so that it can safely reconfigure the group if it loses the majority.
This information is required to extract the set of possible alive nodes and their UUIDs. If the UUIDs in the reconfiguration request do not match those stored in XCOM, it will not allow the reconfiguration to proceed.
Note also that the set of nodes is updated by the MySQL GCS thread whenever a new configuration is delivered and that a user thread is responsible for calling the reconfiguration process. If a user is trying to reconfigure the system, this usually and unfortunately means that it has lost the majority and nothing will be updated by the MySQL GCS thread. However, just for the sake of completeness, we will use a mutex here to control access to this data structure.
Finally, it is worth noting that we cannot use get_site_def() here because information on nodes could be concurrently updated by the XCOM thread and we cannot add a mutex to it.
◆ m_gid
◆ m_gid_hash
unsigned int Gcs_xcom_group_management::m_gid_hash |
|
private |
◆ m_nodes_mutex
◆ m_view_control
◆ m_xcom_nodes
◆ m_xcom_proxy
The documentation for this class was generated from the following files: