MySQL 26.10.0
Source Code Documentation
metadata_cache.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2016, 2026, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef MYSQLROUTER_METADATA_CACHE_INCLUDED
27#define MYSQLROUTER_METADATA_CACHE_INCLUDED
28
30
31#include <atomic>
32#include <chrono>
33#include <stdexcept>
34#include <string>
35
36#include "my_rapidjson_size_t.h"
37
38#include <rapidjson/document.h>
39
41#include "mysql_router_thread.h"
48
49namespace metadata_cache {
50constexpr const uint16_t kDefaultMetadataPort{32275};
51constexpr const std::string_view kDefaultMetadataAddress{"127.0.0.1:32275"};
52constexpr const std::string_view kDefaultMetadataUser{""};
53constexpr const std::string_view kDefaultMetadataPassword{""};
57 2000};
58// blank cluster name means pick the 1st (and only) cluster
59constexpr const std::string_view kDefaultMetadataCluster{""};
60constexpr const unsigned int kDefaultConnectTimeout{
62constexpr const unsigned int kDefaultReadTimeout{
64
65/** @class metadata_error
66 * Class that represents all the exceptions that are thrown while fetching the
67 * metadata.
68 *
69 */
70class metadata_error : public std::runtime_error {
71 public:
72 explicit metadata_error(const std::string &what_arg)
73 : std::runtime_error(what_arg) {}
74};
75
76/**
77 * @brief Abstract class that provides interface for listener on
78 * cluster status changes.
79 *
80 * When state of cluster is changed, notify function is called.
81 */
83 public:
84 /**
85 * @brief Callback function that is called when state of cluster is
86 * changed.
87 *
88 * @param md_servers_reachable true if metadata changed, false if metadata
89 * unavailable
90 * @param view_id current metadata view_id in case of ReplicaSet cluster
91 */
92 virtual void notify_instances_changed(const bool md_servers_reachable,
93 const uint64_t view_id) = 0;
94
96 // disable copy as it isn't needed right now. Feel free to enable
97 // must be explicitly defined though.
99 const ClusterStateListenerInterface &) = delete;
101 const ClusterStateListenerInterface &) = delete;
103};
104
105/**
106 * @brief Abstract class that provides interface for listener on
107 * whether the listening sockets acceptors state should be updated.
108 */
110 public:
111 /**
112 * @brief Callback function that is called when the state of the sockets
113 * acceptors is handled during the metadata refresh.
114 */
116
118
120 default;
122 const AcceptorUpdateHandlerInterface &) = default;
123
126 default;
127
129};
130
131/**
132 * Abstract class that provides interface for listener on metadata refresh.
133 */
135 public:
137
139 default;
141 default;
142
144 const MetadataRefreshListenerInterface &) = default;
147
148 /**
149 * Callback that is going to be used on each metadata refresh.
150 *
151 * @param[in] instances_changed Informs if the cluster topology has changed
152 * since last md refresh.
153 */
154 virtual void on_md_refresh(const bool instances_changed) = 0;
155
157};
158
159/**
160 * @brief Abstract class that provides interface for adding and removing
161 * observers on cluster status changes.
162 *
163 * When state of cluster is changed, then
164 * ClusterStateListenerInterface::notify function is called
165 * for every registered observer.
166 */
168 public:
169 /**
170 * @brief Register observer that is notified when there is a change in the
171 * cluster nodes setup/state discovered.
172 *
173 * @param listener Observer object that is notified when cluster nodes
174 * state is changed.
175 *
176 * @throw std::runtime_error if metadata cache not initialized
177 */
179
180 /**
181 * @brief Unregister observer previously registered with add_state_listener()
182 *
183 * @param listener Observer object that should be unregistered.
184 *
185 * @throw std::runtime_error if metadata cache not initialized
186 */
188 ClusterStateListenerInterface *listener) = 0;
189
191 // disable copy as it isn't needed right now. Feel free to enable
192 // must be explicitly defined though.
194 const ClusterStateNotifierInterface &) = delete;
196 const ClusterStateNotifierInterface &) = delete;
198};
199
200/**
201 * @brief Metadata TTL configuration
202 */
204 // The time to live for the cached data
206
207 // auth_cache_ttl TTL of the rest user authentication data
209
210 // auth_cache_refresh_interval Refresh rate of the rest user authentication
211 // data
213};
214
217 public:
218 /** @brief Initialize a MetadataCache object and start caching
219 *
220 * The metadata_cache::cache_init function will initialize a MetadataCache
221 * object using the given arguments and store it globally using the given
222 * cache_name.
223 *
224 * Parameters host, port, user, password are used to setup the connection with
225 * the metadata server.
226 *
227 * Cache name given by cache_name can be empty, but must be unique.
228 *
229 * The parameters connection_timeout and connection_attempts are used when
230 * connected to the metadata server.
231 *
232 * Throws a std::runtime_error when the cache object was already
233 * initialized.
234 *
235 * @param cluster_type type of the cluster the metadata cache object will
236 * represent (GR or ReplicaSet)
237 * @param router_id id of the router in the cluster metadata
238 * @param clusterset_id UUID of the ClusterSet the Cluster belongs to (if
239 * bootstrapped as a ClusterSet, empty otherwise)
240 * @param metadata_servers The list of cluster metadata servers
241 * @param ttl_config metadata TTL configuration
242 * @param ssl_options SSL related options for connection
243 * @param target_cluster object identifying the Cluster this operation refers
244 * to
245 * @param session_config Metadata MySQL session configuration
246 * @param router_attributes Router attributes to be registered in the metadata
247 * @param thread_stack_size memory in kilobytes allocated for thread's stack
248 * @param use_cluster_notifications Flag indicating if the metadata cache
249 * should use cluster notifications as an
250 * additional trigger for metadata refresh
251 * (only available for GR cluster type)
252 * @param view_id last known view_id of the cluster metadata (only relevant
253 * for ReplicaSet cluster)
254 * @param close_connection_after_refresh if the connection should be closed
255 * after a refresh.
256 *
257 */
258 virtual void cache_init(
259 const mysqlrouter::ClusterType cluster_type, const unsigned router_id,
260 const std::string &clusterset_id,
261 const metadata_servers_list_t &metadata_servers,
262 const MetadataCacheTTLConfig &ttl_config,
263 const mysqlrouter::SSLOptions &ssl_options,
264 const mysqlrouter::TargetCluster &target_cluster,
265 const MetadataCacheMySQLSessionConfig &session_config,
266 const RouterAttributes &router_attributes,
267 size_t thread_stack_size = mysql_harness::kDefaultStackSizeInKiloBytes,
268 bool use_cluster_notifications = false, const uint64_t view_id = 0,
269 bool close_connection_after_refresh = false) = 0;
270
271 virtual void instance_name(const std::string &inst_name) = 0;
272 virtual std::string instance_name() const = 0;
273
274 virtual bool is_initialized() noexcept = 0;
275
276 virtual mysqlrouter::ClusterType cluster_type() const = 0;
277
278 /**
279 * @brief Start the metadata cache
280 */
281 virtual void cache_start() = 0;
282
283 /**
284 * @brief Teardown the metadata cache
285 */
286 virtual void cache_stop() noexcept = 0;
287
288 /** Reapply TLS material for metadata sessions created after this call. */
289 virtual void reload_tls() = 0;
290
291 /** @brief Returns list of managed server in a HA cluster
292 * * Returns a list of MySQL servers managed by the topology for the given
293 * HA cluster.
294 *
295 * @return List of ManagedInstance objects
296 */
297 virtual cluster_nodes_list_t get_cluster_nodes() = 0;
298
299 /** @brief Return object containing current cluster topology.
300 *
301 * @return List of ManagedInstance objects
302 */
303 virtual ClusterTopology get_cluster_topology() = 0;
304
305 /** @brief Wait until there's a primary member in the cluster
306 *
307 * To be called when the primary member of a single-primary cluster is down
308 * and we want to wait until one becomes elected.
309 *
310 * @param primary_server_uuid - server_uuid of the PRIMARY that shall be
311 * failover from.
312 * @param timeout - amount of time to wait for a failover, in seconds
313 * @return true if a primary member exists
314 */
315 virtual bool wait_primary_failover(const std::string &primary_server_uuid,
316 const std::chrono::seconds &timeout) = 0;
317
318 /**
319 * @brief Register observer that is notified when there is a change in the
320 * cluster nodes setup/state discovered.
321 *
322 * @param listener Observer object that is notified when cluster nodes
323 * state is changed.
324 */
325 void add_state_listener(ClusterStateListenerInterface *listener) override = 0;
326
327 /**
328 * @brief Unregister observer previously registered with add_state_listener()
329 *
330 * @param listener Observer object that should be unregistered.
331 */
332 void remove_state_listener(ClusterStateListenerInterface *listener) override =
333 0;
334
335 /**
336 * @brief Register observer that is notified when the state of listening
337 * socket acceptors should be updated on the next metadata refresh.
338 *
339 * @param listener Observer object that is notified when replicaset nodes
340 * state is changed.
341 */
342 virtual void add_acceptor_handler_listener(
343 AcceptorUpdateHandlerInterface *listener) = 0;
344
345 /**
346 * @brief Unregister observer previously registered with
347 * add_acceptor_handler_listener()
348 *
349 * @param listener Observer object that should be unregistered.
350 */
351 virtual void remove_acceptor_handler_listener(
352 AcceptorUpdateHandlerInterface *listener) = 0;
353
354 /**
355 * Register observer that is notified when the metadata refresh is triggered.
356 *
357 * @param listener Observer object that is notified on metadata refresh.
358 */
359 virtual void add_md_refresh_listener(
361
362 /**
363 * @brief Unregister observer previously registered with
364 * add_md_refresh_listener()
365 *
366 * @param listener Observer object that should be unregistered.
367 */
368 virtual void remove_md_refresh_listener(
370
371 /** @brief Get authentication data (password hash and privileges) for the
372 * given user.
373 *
374 * @param username - name of the user for which the authentidation data
375 * is requested
376 * @return true and password hash with privileges - authentication data
377 * requested for the given user.
378 * @return false and empty data set - username is not found or authentication
379 * data expired.
380 */
381 virtual std::pair<bool, std::pair<std::string, rapidjson::Document>>
382 get_rest_user_auth_data(const std::string &username) const = 0;
383
384 /**
385 * @brief Enable fetching authentication metadata when using metadata_cache
386 * http authentication backend.
387 */
388 virtual void enable_fetch_auth_metadata() = 0;
389
390 /**
391 * Force cache update in refresh loop.
392 */
393 virtual void force_cache_update() = 0;
394
395 /**
396 * Check values of auth_cache_ttl and auth_cache_refresh_interval timers.
397 *
398 * @throw std::invalid_argument for each of the following scenarios:
399 * 1. auth_cache_ttl < ttl
400 * 2. auth_cache_refresh_interval < ttl
401 * 3. auth_cache_refresh_interval > auth_cache_ttl
402 */
403 virtual void check_auth_metadata_timers() const = 0;
404
405 /**
406 * Toggle socket acceptors state update on next metadata refresh.
407 */
408 virtual void handle_sockets_acceptors_on_md_refresh() = 0;
409
410 /**
411 * Callback which is going to update the routing guidelines used by the
412 * routing guidelines engine.
413 */
415 std::function<routing_guidelines::Routing_guidelines_engine::RouteChanges(
416 const std::string &)>;
417
418 /**
419 * Callback used to verify existing connections according to the new routing
420 * guidelines.
421 */
423 const routing_guidelines::Routing_guidelines_engine::RouteChanges &)>;
424
425 virtual void add_routing_guidelines_update_callbacks(
428
429 virtual void clear_routing_guidelines_update_callbacks() = 0;
430
431 /**
432 * Callback used to update the router information used by the routing
433 * guidelines engine.
434 */
436 std::function<void(const routing_guidelines::Router_info &)>;
437
438 virtual void add_router_info_update_callback(
440
441 virtual void clear_router_info_update_callback() = 0;
442
444 // disable copy as it isn't needed right now. Feel free to enable
445 // must be explicitly defined though.
446 explicit MetadataCacheAPIBase(const MetadataCacheAPIBase &) = delete;
447 MetadataCacheAPIBase &operator=(const MetadataCacheAPIBase &) = delete;
448 ~MetadataCacheAPIBase() override = default;
449
453 std::chrono::system_clock::time_point last_refresh_succeeded;
454 std::chrono::system_clock::time_point last_refresh_failed;
455
458 };
459
462
463 virtual std::chrono::milliseconds ttl() const = 0;
464
465 using metadata_factory_t = std::function<std::shared_ptr<MetaData>(
466 mysqlrouter::ClusterType cluster_type,
468 const mysqlrouter::SSLOptions &ssl_options,
469 const bool use_cluster_notifications, unsigned view_id)>;
470
472};
473
474// This provides a factory method that returns a pluggable instance
475// to the underlying transport layer implementation. The transport
476// layer provides the means from which the metadata is
477// fetched.
478
479std::shared_ptr<MetaData> metadata_factory_get_instance(
480 const mysqlrouter::ClusterType cluster_type,
482 const mysqlrouter::SSLOptions &ssl_options, const bool use_gr_notifications,
483 const unsigned view_id);
484
486 public:
487 static MetadataCacheAPIBase *instance();
488
489 void cache_init(const mysqlrouter::ClusterType cluster_type,
490 const unsigned router_id, const std::string &clusterset_id,
491 const metadata_servers_list_t &metadata_servers,
492 const MetadataCacheTTLConfig &ttl_config,
493 const mysqlrouter::SSLOptions &ssl_options,
494 const mysqlrouter::TargetCluster &target_cluster,
495 const MetadataCacheMySQLSessionConfig &session_config,
496 const RouterAttributes &router_attributes,
497 size_t thread_stack_size, bool use_cluster_notifications,
498 const uint64_t view_id,
499 bool close_connection_after_refresh) override;
500
501 mysqlrouter::ClusterType cluster_type() const override;
502
503 void instance_name(const std::string &inst_name) override;
504 std::string instance_name() const override;
505
506 mysqlrouter::TargetCluster target_cluster() const override;
507 std::chrono::milliseconds ttl() const override;
508
509 bool is_initialized() noexcept override { return is_initialized_; }
510 void cache_start() override;
511
512 void cache_stop() noexcept override;
513 void reload_tls() override;
514
515 cluster_nodes_list_t get_cluster_nodes() override;
516 ClusterTopology get_cluster_topology() override;
517
518 bool wait_primary_failover(const std::string &primary_server_uuid,
519 const std::chrono::seconds &timeout) override;
520
521 void add_state_listener(ClusterStateListenerInterface *listener) override;
522
523 void remove_state_listener(ClusterStateListenerInterface *listener) override;
524
525 void add_acceptor_handler_listener(
526 AcceptorUpdateHandlerInterface *listener) override;
527
528 void remove_acceptor_handler_listener(
529 AcceptorUpdateHandlerInterface *listener) override;
530
531 void add_md_refresh_listener(
532 MetadataRefreshListenerInterface *listener) override;
533
534 void remove_md_refresh_listener(
535 MetadataRefreshListenerInterface *listener) override;
536
537 RefreshStatus get_refresh_status() override;
538
539 std::pair<bool, std::pair<std::string, rapidjson::Document>>
540 get_rest_user_auth_data(const std::string &user) const override;
541
542 void enable_fetch_auth_metadata() override;
543 void force_cache_update() override;
544 void check_auth_metadata_timers() const override;
545
546 void handle_sockets_acceptors_on_md_refresh() override;
547
548 void add_routing_guidelines_update_callbacks(
549 update_routing_guidelines_callback_t,
550 on_routing_guidelines_change_callback_t) override;
551
552 void clear_routing_guidelines_update_callbacks() override;
553
554 void add_router_info_update_callback(
555 update_router_info_callback_t clb) override;
556
557 void clear_router_info_update_callback() override;
558
559 void set_instance_factory(metadata_factory_t cb) override {
560 instance_factory_ = std::move(cb);
561 }
562
563 private:
565
566 struct InstData {
567 std::string name;
568 };
570
571 std::atomic<bool> is_initialized_{false};
572 MetadataCacheAPI() = default;
575};
576
577} // namespace metadata_cache
578
579#endif // MYSQLROUTER_METADATA_CACHE_INCLUDED
Monitor pattern.
Definition: monitor.h:39
Abstract class that provides interface for listener on whether the listening sockets acceptors state ...
Definition: metadata_cache.h:109
virtual bool update_socket_acceptor_state()=0
Callback function that is called when the state of the sockets acceptors is handled during the metada...
AcceptorUpdateHandlerInterface & operator=(AcceptorUpdateHandlerInterface &&)=default
AcceptorUpdateHandlerInterface & operator=(const AcceptorUpdateHandlerInterface &)=default
AcceptorUpdateHandlerInterface(AcceptorUpdateHandlerInterface &&)=default
AcceptorUpdateHandlerInterface(const AcceptorUpdateHandlerInterface &)=default
Abstract class that provides interface for listener on cluster status changes.
Definition: metadata_cache.h:82
virtual void notify_instances_changed(const bool md_servers_reachable, const uint64_t view_id)=0
Callback function that is called when state of cluster is changed.
ClusterStateListenerInterface & operator=(const ClusterStateListenerInterface &)=delete
ClusterStateListenerInterface(const ClusterStateListenerInterface &)=delete
Abstract class that provides interface for adding and removing observers on cluster status changes.
Definition: metadata_cache.h:167
ClusterStateNotifierInterface(const ClusterStateNotifierInterface &)=delete
ClusterStateNotifierInterface & operator=(const ClusterStateNotifierInterface &)=delete
virtual void add_state_listener(ClusterStateListenerInterface *listener)=0
Register observer that is notified when there is a change in the cluster nodes setup/state discovered...
virtual void remove_state_listener(ClusterStateListenerInterface *listener)=0
Unregister observer previously registered with add_state_listener()
Definition: metadata_cache.h:216
virtual std::string instance_name() const =0
virtual std::chrono::milliseconds ttl() const =0
virtual void instance_name(const std::string &inst_name)=0
std::function< void(const routing_guidelines::Router_info &)> update_router_info_callback_t
Callback used to update the router information used by the routing guidelines engine.
Definition: metadata_cache.h:436
virtual bool is_initialized() noexcept=0
virtual mysqlrouter::TargetCluster target_cluster() const =0
std::function< void(const routing_guidelines::Routing_guidelines_engine::RouteChanges &)> on_routing_guidelines_change_callback_t
Callback used to verify existing connections according to the new routing guidelines.
Definition: metadata_cache.h:423
virtual RefreshStatus get_refresh_status()=0
std::function< routing_guidelines::Routing_guidelines_engine::RouteChanges(const std::string &)> update_routing_guidelines_callback_t
Callback which is going to update the routing guidelines used by the routing guidelines engine.
Definition: metadata_cache.h:416
virtual void set_instance_factory(metadata_factory_t cb)=0
std::function< std::shared_ptr< MetaData >(mysqlrouter::ClusterType cluster_type, const metadata_cache::MetadataCacheMySQLSessionConfig &session_config, const mysqlrouter::SSLOptions &ssl_options, const bool use_cluster_notifications, unsigned view_id)> metadata_factory_t
Definition: metadata_cache.h:469
virtual void cache_init(const mysqlrouter::ClusterType cluster_type, const unsigned router_id, const std::string &clusterset_id, const metadata_servers_list_t &metadata_servers, const MetadataCacheTTLConfig &ttl_config, const mysqlrouter::SSLOptions &ssl_options, const mysqlrouter::TargetCluster &target_cluster, const MetadataCacheMySQLSessionConfig &session_config, const RouterAttributes &router_attributes, size_t thread_stack_size=mysql_harness::kDefaultStackSizeInKiloBytes, bool use_cluster_notifications=false, const uint64_t view_id=0, bool close_connection_after_refresh=false)=0
Initialize a MetadataCache object and start caching.
Definition: metadata_cache.h:485
bool is_initialized() noexcept override
Definition: metadata_cache.h:509
MetadataCacheAPI & operator=(const MetadataCacheAPI &)=delete
MetadataCacheAPI(const MetadataCacheAPI &)=delete
Abstract class that provides interface for listener on metadata refresh.
Definition: metadata_cache.h:134
MetadataRefreshListenerInterface & operator=(const MetadataRefreshListenerInterface &)=default
virtual void on_md_refresh(const bool instances_changed)=0
Callback that is going to be used on each metadata refresh.
MetadataRefreshListenerInterface & operator=(MetadataRefreshListenerInterface &&)=default
MetadataRefreshListenerInterface(const MetadataRefreshListenerInterface &)=default
MetadataRefreshListenerInterface(MetadataRefreshListenerInterface &&)=default
Class that represents all the exceptions that are thrown while fetching the metadata.
Definition: metadata_cache.h:70
metadata_error(const std::string &what_arg)
Definition: metadata_cache.h:72
static constexpr int kDefaultReadTimeout
Definition: mysql_session.h:160
static constexpr int kDefaultConnectTimeout
Definition: mysql_session.h:159
Definition: cluster_metadata.h:179
#define METADATA_CACHE_EXPORT
Definition: metadata_cache_export.h:15
Define rapidjson::SizeType to be std::uint64_t.
static bool cb(unsigned long long new_value)
Definition: option_usage.cc:45
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:499
Definition: metadata_cache.h:49
constexpr const std::string_view kDefaultMetadataCluster
Definition: metadata_cache.h:59
constexpr const std::string_view kDefaultMetadataUser
Definition: metadata_cache.h:52
std::vector< metadata_server_t > metadata_servers_list_t
Definition: metadata_cache_datatypes.h:178
std::vector< ManagedInstance > cluster_nodes_list_t
Definition: metadata_cache_datatypes.h:174
constexpr const std::string_view kDefaultMetadataAddress
Definition: metadata_cache.h:51
constexpr const std::chrono::milliseconds kDefaultAuthCacheTTL
Definition: metadata_cache.h:54
constexpr const std::string_view kDefaultMetadataPassword
Definition: metadata_cache.h:53
constexpr const unsigned int kDefaultConnectTimeout
Definition: metadata_cache.h:60
constexpr const std::chrono::milliseconds kDefaultAuthCacheRefreshInterval
Definition: metadata_cache.h:56
constexpr const uint16_t kDefaultMetadataPort
Definition: metadata_cache.h:50
constexpr const unsigned int kDefaultReadTimeout
Definition: metadata_cache.h:62
std::shared_ptr< MetaData > metadata_factory_get_instance(const mysqlrouter::ClusterType cluster_type, const metadata_cache::MetadataCacheMySQLSessionConfig &session_config, const mysqlrouter::SSLOptions &ssl_options, const bool use_gr_notifications, const unsigned view_id)
Return an instance of cluster metadata.
Definition: metadata_factory.cc:48
std::chrono::seconds seconds
Definition: authorize_manager.cc:71
std::chrono::milliseconds milliseconds
Definition: authorize_manager.cc:70
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76
static const size_t kDefaultStackSizeInKiloBytes
Definition: mysql_router_thread.h:44
Definition: mrs_component_embedded_mysql_session.h:29
ClusterType
Definition: cluster_metadata.h:157
Definition: my_rapidjson_size_t.h:38
Definition: routing_guidelines_datatypes.h:31
Define std::hash<Gtid>.
Definition: gtid.h:355
Represents a cluster (a GR group or AR members) and its metadata servers.
Definition: metadata_cache_datatypes.h:217
std::string last_metadata_server_host
Definition: metadata_cache.h:456
uint64_t refresh_failed
Definition: metadata_cache.h:451
std::chrono::system_clock::time_point last_refresh_failed
Definition: metadata_cache.h:454
uint16_t last_metadata_server_port
Definition: metadata_cache.h:457
uint64_t refresh_succeeded
Definition: metadata_cache.h:452
std::chrono::system_clock::time_point last_refresh_succeeded
Definition: metadata_cache.h:453
Definition: metadata_cache.h:566
std::string name
Definition: metadata_cache.h:567
Metadata MySQL session configuration.
Definition: metadata_cache_datatypes.h:257
Metadata TTL configuration.
Definition: metadata_cache.h:203
std::chrono::milliseconds auth_cache_refresh_interval
Definition: metadata_cache.h:212
std::chrono::milliseconds ttl
Definition: metadata_cache.h:205
std::chrono::milliseconds auth_cache_ttl
Definition: metadata_cache.h:208
Definition: metadata_cache_datatypes.h:273
SSL connection related options.
Definition: datatypes.h:34