MySQL 9.1.0
Source Code Documentation
cluster_metadata.h File Reference
#include "mysqlrouter/router_cluster_export.h"
#include <chrono>
#include <optional>
#include <stdexcept>
#include <string>
#include "mysql/harness/stdx/expected.h"

Go to the source code of this file.

Classes

struct  mysqlrouter::MetadataSchemaVersion
 
class  mysqlrouter::MetadataUpgradeInProgressException
 
class  mysqlrouter::TargetCluster
 

Namespaces

namespace  mysqlrouter
 

Enumerations

enum class  mysqlrouter::ClusterType { mysqlrouter::GR_V2 , mysqlrouter::GR_CS , mysqlrouter::RS_V2 }
 
enum class  mysqlrouter::InstanceType { mysqlrouter::GroupMember , mysqlrouter::AsyncMember , mysqlrouter::ReadReplica , mysqlrouter::Unsupported }
 

Functions

std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const MetadataSchemaVersion &version)
 
MetadataSchemaVersion ROUTER_CLUSTER_EXPORT mysqlrouter::get_metadata_schema_version (MySQLSession *mysql)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::metadata_schema_version_is_compatible (const mysqlrouter::MetadataSchemaVersion &required, const mysqlrouter::MetadataSchemaVersion &available)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::get_metadata_schema_uncompatible_msg (const mysqlrouter::MetadataSchemaVersion &version)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::check_group_replication_online (MySQLSession *mysql)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::check_group_has_quorum (MySQLSession *mysql)
 
template<size_t N>
bool mysqlrouter::metadata_schema_version_is_compatible (const mysqlrouter::MetadataSchemaVersion(&required)[N], const mysqlrouter::MetadataSchemaVersion &available)
 
template<size_t N>
std::string mysqlrouter::to_string (const mysqlrouter::MetadataSchemaVersion(&version)[N])
 
ClusterType ROUTER_CLUSTER_EXPORT mysqlrouter::get_cluster_type (const MetadataSchemaVersion &schema_version, MySQLSession *mysql, unsigned int router_id=0)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const ClusterType cluster_type)
 
stdx::expected< void, std::string > ROUTER_CLUSTER_EXPORT mysqlrouter::setup_metadata_session (MySQLSession &session)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::is_part_of_cluster_set (MySQLSession *mysql)
 
std::optional< InstanceType > ROUTER_CLUSTER_EXPORT mysqlrouter::str_to_instance_type (const std::string &)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const InstanceType)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const TargetCluster::InvalidatedClusterRoutingPolicy)
 

Variables

constexpr MetadataSchemaVersion mysqlrouter::kRequiredBootstrapSchemaVersion [] {{2, 0, 0}}
 
constexpr MetadataSchemaVersion mysqlrouter::kRequiredRoutingMetadataSchemaVersion []
 
constexpr MetadataSchemaVersion mysqlrouter::kNewMetadataVersion {2, 0, 0}
 
constexpr MetadataSchemaVersion mysqlrouter::kClusterSetsMetadataVersion {2, 1, 0}
 
constexpr MetadataSchemaVersion mysqlrouter::kUpgradeInProgressMetadataVersion {0, 0, 0}
 
constexpr const std::string_view mysqlrouter::kNodeTagHidden {"_hidden"}
 
constexpr const std::string_view mysqlrouter::kNodeTagDisconnectWhenHidden
 
constexpr const bool mysqlrouter::kNodeTagHiddenDefault {false}
 
constexpr const bool mysqlrouter::kNodeTagDisconnectWhenHiddenDefault {true}
 
constexpr const std::chrono::milliseconds mysqlrouter::kDefaultMetadataTTLCluster {500}
 
constexpr const std::chrono::milliseconds mysqlrouter::kDefaultMetadataTTLClusterGRNotificationsON
 
constexpr const std::chrono::milliseconds mysqlrouter::kDefaultMetadataTTLClusterSet
 
const bool mysqlrouter::kDefaultUseGRNotificationsCluster = false
 
const bool mysqlrouter::kDefaultUseGRNotificationsClusterSet = true