26#ifndef MYSQLROUTER_CLUSTER_METADATA_INCLUDED
27#define MYSQLROUTER_CLUSTER_METADATA_INCLUDED
118 for (
size_t i = 0; i <
N; ++i) {
129 for (
size_t i = 0; i <
N; ++i) {
147 MySQLSession *
mysql,
unsigned int router_id = 0);
164 const std::string &value =
"")
193 "_disconnect_existing_sessions_when_hidden"};
208constexpr const std::chrono::milliseconds
210 std::chrono::milliseconds(60 * 1000);
Definition: mysql_session.h:153
Definition: cluster_metadata.h:158
void invalidated_cluster_routing_policy(const InvalidatedClusterRoutingPolicy value)
Definition: cluster_metadata.h:179
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy() const
Definition: cluster_metadata.h:173
void target_value(const std::string &value)
Definition: cluster_metadata.h:178
TargetCluster(const TargetType type=TargetType::ByPrimaryRole, const std::string &value="")
Definition: cluster_metadata.h:163
TargetType
Definition: cluster_metadata.h:160
InvalidatedClusterRoutingPolicy
Definition: cluster_metadata.h:161
void target_type(const TargetType value)
Definition: cluster_metadata.h:177
std::string target_value_
Definition: cluster_metadata.h:186
TargetType target_type_
Definition: cluster_metadata.h:185
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy_
Definition: cluster_metadata.h:187
std::string to_string() const
Definition: cluster_metadata.h:169
const char * c_str() const
Definition: cluster_metadata.h:170
TargetType target_type() const
Definition: cluster_metadata.h:172
Definition: expected.h:284
std::atomic< Type > N
Definition: ut0counter.h:225
Definition: instrumented_condition_variable.h:32
std::string ROUTER_LIB_EXPORT get_metadata_schema_uncompatible_msg(const mysqlrouter::MetadataSchemaVersion &version)
Definition: cluster_metadata.cc:411
constexpr MetadataSchemaVersion kClusterSetsMetadataVersion
Definition: cluster_metadata.h:93
constexpr MetadataSchemaVersion kNewMetadataVersion
Definition: cluster_metadata.h:90
bool ROUTER_LIB_EXPORT is_part_of_cluster_set(MySQLSession *mysql)
Definition: cluster_metadata.cc:1084
ClusterType
Definition: cluster_metadata.h:139
InstanceType
Definition: cluster_metadata.h:198
constexpr MetadataSchemaVersion kUpgradeInProgressMetadataVersion
Definition: cluster_metadata.h:96
constexpr MetadataSchemaVersion kRequiredRoutingMetadataSchemaVersion[]
Definition: cluster_metadata.h:86
constexpr const std::string_view kNodeTagDisconnectWhenHidden
Definition: cluster_metadata.h:192
constexpr const std::string_view kNodeTagHidden
Definition: cluster_metadata.h:191
MetadataSchemaVersion ROUTER_LIB_EXPORT get_metadata_schema_version(MySQLSession *mysql)
Definition: cluster_metadata.cc:425
stdx::expected< void, std::string > ROUTER_LIB_EXPORT setup_metadata_session(MySQLSession &session)
Definition: cluster_metadata.cc:1257
bool ROUTER_LIB_EXPORT check_group_has_quorum(MySQLSession *mysql)
Definition: cluster_metadata.cc:492
constexpr MetadataSchemaVersion kRequiredBootstrapSchemaVersion[]
Definition: cluster_metadata.h:83
constexpr const std::chrono::milliseconds kDefaultMetadataTTLClusterGRNotificationsON
Definition: cluster_metadata.h:209
ClusterType ROUTER_LIB_EXPORT get_cluster_type(const MetadataSchemaVersion &schema_version, MySQLSession *mysql, unsigned int router_id=0)
Definition: cluster_metadata.cc:1125
constexpr const std::chrono::milliseconds kDefaultMetadataTTLClusterSet
Definition: cluster_metadata.h:211
const bool kDefaultUseGRNotificationsClusterSet
Definition: cluster_metadata.h:215
bool ROUTER_LIB_EXPORT check_group_replication_online(MySQLSession *mysql)
Definition: cluster_metadata.cc:476
bool ROUTER_LIB_EXPORT metadata_schema_version_is_compatible(const mysqlrouter::MetadataSchemaVersion &required, const mysqlrouter::MetadataSchemaVersion &available)
Definition: cluster_metadata.cc:397
constexpr const std::chrono::milliseconds kDefaultMetadataTTLCluster
Definition: cluster_metadata.h:207
constexpr const bool kNodeTagDisconnectWhenHiddenDefault
Definition: cluster_metadata.h:196
constexpr const bool kNodeTagHiddenDefault
Definition: cluster_metadata.h:195
std::optional< InstanceType > ROUTER_LIB_EXPORT str_to_instance_type(const std::string &)
Definition: cluster_metadata.cc:1285
std::string ROUTER_LIB_EXPORT to_string(const MetadataSchemaVersion &version)
Definition: cluster_metadata.cc:420
const bool kDefaultUseGRNotificationsCluster
Definition: cluster_metadata.h:214
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_LIB_EXPORT
Definition: router_export.h:15