26#ifndef MYSQLROUTER_CLUSTER_METADATA_INCLUDED
27#define MYSQLROUTER_CLUSTER_METADATA_INCLUDED
119 for (
size_t i = 0; i <
N; ++i) {
130 for (
size_t i = 0; i <
N; ++i) {
148 MySQLSession *
mysql,
unsigned int router_id = 0);
165 const std::string &value =
"")
194 "_disconnect_existing_sessions_when_hidden"};
209constexpr const std::chrono::milliseconds
211 std::chrono::milliseconds(60 * 1000);
Definition: mysql_session.h:154
Definition: cluster_metadata.h:159
void invalidated_cluster_routing_policy(const InvalidatedClusterRoutingPolicy value)
Definition: cluster_metadata.h:180
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy() const
Definition: cluster_metadata.h:174
void target_value(const std::string &value)
Definition: cluster_metadata.h:179
TargetCluster(const TargetType type=TargetType::ByPrimaryRole, const std::string &value="")
Definition: cluster_metadata.h:164
TargetType
Definition: cluster_metadata.h:161
InvalidatedClusterRoutingPolicy
Definition: cluster_metadata.h:162
void target_type(const TargetType value)
Definition: cluster_metadata.h:178
std::string target_value_
Definition: cluster_metadata.h:187
TargetType target_type_
Definition: cluster_metadata.h:186
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy_
Definition: cluster_metadata.h:188
std::string to_string() const
Definition: cluster_metadata.h:170
const char * c_str() const
Definition: cluster_metadata.h:171
TargetType target_type() const
Definition: cluster_metadata.h:173
Definition: expected.h:286
std::atomic< Type > N
Definition: ut0counter.h:225
Definition: instrumented_condition_variable.h:32
constexpr MetadataSchemaVersion kClusterSetsMetadataVersion
Definition: cluster_metadata.h:94
constexpr MetadataSchemaVersion kNewMetadataVersion
Definition: cluster_metadata.h:91
bool ROUTER_CLUSTER_EXPORT is_part_of_cluster_set(MySQLSession *mysql)
Definition: cluster_metadata.cc:1082
ClusterType
Definition: cluster_metadata.h:140
InstanceType
Definition: cluster_metadata.h:199
constexpr MetadataSchemaVersion kUpgradeInProgressMetadataVersion
Definition: cluster_metadata.h:97
constexpr MetadataSchemaVersion kRequiredRoutingMetadataSchemaVersion[]
Definition: cluster_metadata.h:87
constexpr const std::string_view kNodeTagDisconnectWhenHidden
Definition: cluster_metadata.h:193
constexpr const std::string_view kNodeTagHidden
Definition: cluster_metadata.h:192
MetadataSchemaVersion ROUTER_CLUSTER_EXPORT get_metadata_schema_version(MySQLSession *mysql)
Definition: cluster_metadata.cc:423
std::string ROUTER_CLUSTER_EXPORT get_metadata_schema_uncompatible_msg(const mysqlrouter::MetadataSchemaVersion &version)
Definition: cluster_metadata.cc:409
stdx::expected< void, std::string > ROUTER_CLUSTER_EXPORT setup_metadata_session(MySQLSession &session)
Definition: cluster_metadata.cc:1255
bool ROUTER_CLUSTER_EXPORT check_group_has_quorum(MySQLSession *mysql)
Definition: cluster_metadata.cc:490
constexpr MetadataSchemaVersion kRequiredBootstrapSchemaVersion[]
Definition: cluster_metadata.h:84
constexpr const std::chrono::milliseconds kDefaultMetadataTTLClusterGRNotificationsON
Definition: cluster_metadata.h:210
ClusterType ROUTER_CLUSTER_EXPORT get_cluster_type(const MetadataSchemaVersion &schema_version, MySQLSession *mysql, unsigned int router_id=0)
Definition: cluster_metadata.cc:1123
constexpr const std::chrono::milliseconds kDefaultMetadataTTLClusterSet
Definition: cluster_metadata.h:212
const bool kDefaultUseGRNotificationsClusterSet
Definition: cluster_metadata.h:216
bool ROUTER_CLUSTER_EXPORT check_group_replication_online(MySQLSession *mysql)
Definition: cluster_metadata.cc:474
bool ROUTER_CLUSTER_EXPORT metadata_schema_version_is_compatible(const mysqlrouter::MetadataSchemaVersion &required, const mysqlrouter::MetadataSchemaVersion &available)
Definition: cluster_metadata.cc:395
constexpr const std::chrono::milliseconds kDefaultMetadataTTLCluster
Definition: cluster_metadata.h:208
constexpr const bool kNodeTagDisconnectWhenHiddenDefault
Definition: cluster_metadata.h:197
constexpr const bool kNodeTagHiddenDefault
Definition: cluster_metadata.h:196
std::optional< InstanceType > ROUTER_CLUSTER_EXPORT str_to_instance_type(const std::string &)
Definition: cluster_metadata.cc:1283
std::string ROUTER_CLUSTER_EXPORT to_string(const MetadataSchemaVersion &version)
Definition: cluster_metadata.cc:418
const bool kDefaultUseGRNotificationsCluster
Definition: cluster_metadata.h:215
struct result result
Definition: result.h:34
required uint64 version
Definition: replication_group_member_actions.proto:41
required string type
Definition: replication_group_member_actions.proto:34
#define ROUTER_CLUSTER_EXPORT
Definition: router_cluster_export.h:15