MySQL 9.1.0
Source Code Documentation
cluster_metadata_gr.cc File Reference
#include "cluster_metadata_gr.h"
#include <algorithm>
#include <optional>
#include "dim.h"
#include "group_replication_metadata.h"
#include "log_suppressor.h"
#include "mysql/harness/event_state_tracker.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/stdx/ranges.h"
#include "mysqlrouter/metadata_cache.h"
#include "mysqlrouter/mysql_session.h"
#include "mysqlrouter/uri.h"
#include "mysqlrouter/utils.h"
#include "router_options.h"

Classes

class  GRMetadataBackend
 
class  GRMetadataBackendV2
 
class  GRClusterSetMetadataBackend
 

Namespaces

 

Typedefs

using ConnectCallback = std::function< bool(mysqlrouter::MySQLSession &connection, const metadata_cache::ManagedInstance &mi)>
 

Functions

std::vector< metadata_cache::metadata_servers_list_tget_all_metadata_servers (const metadata_cache::metadata_servers_list_t &metadata_servers)
 
bool anonymous_namespace{cluster_metadata_gr.cc}::backends_compatible (const ClusterType a, const ClusterType b)
 
void sort_cluster_nodes (metadata_cache::ManagedCluster &cluster, const metadata_cache::metadata_servers_list_t &sorted_metadata_servers)
 
void apply_read_only_targets_option (metadata_cache::cluster_nodes_list_t &nodes, ReadOnlyTargets read_only_targets)
 
static std::string where_target_cluster_v2 (MySQLSession &session, const mysqlrouter::TargetCluster &target_cluster)
 
static stdx::expected< uint64_t, std::error_code > get_member_view_id (mysqlrouter::MySQLSession &session, const std::string &clusterset_id)
 
static std::string where_target_cluster_cs (const mysqlrouter::TargetCluster &target_cluster, mysqlrouter::MySQLSession &session)
 
static stdx::expected< std::string, std::error_code > get_clusterset_id (mysqlrouter::MySQLSession &session, const mysqlrouter::TargetCluster &target_cluster)
 
static void log_target_cluster_warnings (const metadata_cache::ManagedCluster &cluster, const mysqlrouter::TargetCluster::InvalidatedClusterRoutingPolicy invalidated_cluster_policy)
 
static bool is_cluster_usable (const metadata_cache::ManagedCluster &cluster, const mysqlrouter::TargetCluster::InvalidatedClusterRoutingPolicy &invalidated_cluster_policy)
 
static std::optional< size_t > target_cluster_pos (const metadata_cache::ClusterTopology &topology, const std::string &target_cluster_id)
 

Typedef Documentation

◆ ConnectCallback

using ConnectCallback = std::function<bool(mysqlrouter::MySQLSession &connection, const metadata_cache::ManagedInstance &mi)>

Function Documentation

◆ apply_read_only_targets_option()

void apply_read_only_targets_option ( metadata_cache::cluster_nodes_list_t nodes,
ReadOnlyTargets  read_only_targets 
)

◆ get_all_metadata_servers()

std::vector< metadata_cache::metadata_servers_list_t > get_all_metadata_servers ( const metadata_cache::metadata_servers_list_t metadata_servers)

◆ get_clusterset_id()

static stdx::expected< std::string, std::error_code > get_clusterset_id ( mysqlrouter::MySQLSession session,
const mysqlrouter::TargetCluster target_cluster 
)
static

◆ get_member_view_id()

static stdx::expected< uint64_t, std::error_code > get_member_view_id ( mysqlrouter::MySQLSession session,
const std::string &  clusterset_id 
)
static

◆ is_cluster_usable()

static bool is_cluster_usable ( const metadata_cache::ManagedCluster cluster,
const mysqlrouter::TargetCluster::InvalidatedClusterRoutingPolicy invalidated_cluster_policy 
)
static

◆ log_target_cluster_warnings()

static void log_target_cluster_warnings ( const metadata_cache::ManagedCluster cluster,
const mysqlrouter::TargetCluster::InvalidatedClusterRoutingPolicy  invalidated_cluster_policy 
)
static

◆ sort_cluster_nodes()

void sort_cluster_nodes ( metadata_cache::ManagedCluster cluster,
const metadata_cache::metadata_servers_list_t sorted_metadata_servers 
)

◆ target_cluster_pos()

static std::optional< size_t > target_cluster_pos ( const metadata_cache::ClusterTopology topology,
const std::string &  target_cluster_id 
)
static

◆ where_target_cluster_cs()

static std::string where_target_cluster_cs ( const mysqlrouter::TargetCluster target_cluster,
mysqlrouter::MySQLSession session 
)
static

◆ where_target_cluster_v2()

static std::string where_target_cluster_v2 ( MySQLSession session,
const mysqlrouter::TargetCluster target_cluster 
)
static