MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
metadata_cache.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2016, 2024, 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{""};
54constexpr const std::chrono::milliseconds kDefaultAuthCacheTTL{
56constexpr const std::chrono::milliseconds kDefaultAuthCacheRefreshInterval{
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
205 std::chrono::milliseconds ttl;
206
207 // auth_cache_ttl TTL of the rest user authentication data
208 std::chrono::milliseconds auth_cache_ttl;
209
210 // auth_cache_refresh_interval Refresh rate of the rest user authentication
211 // data
212 std::chrono::milliseconds auth_cache_refresh_interval;
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 /** @brief Returns list of managed server in a HA cluster
289 * * Returns a list of MySQL servers managed by the topology for the given
290 * HA cluster.
291 *
292 * @return List of ManagedInstance objects
293 */
294 virtual cluster_nodes_list_t get_cluster_nodes() = 0;
295
296 /** @brief Return object containing current cluster topology.
297 *
298 * @return List of ManagedInstance objects
299 */
300 virtual ClusterTopology get_cluster_topology() = 0;
301
302 /** @brief Wait until there's a primary member in the cluster
303 *
304 * To be called when the primary member of a single-primary cluster is down
305 * and we want to wait until one becomes elected.
306 *
307 * @param primary_server_uuid - server_uuid of the PRIMARY that shall be
308 * failover from.
309 * @param timeout - amount of time to wait for a failover, in seconds
310 * @return true if a primary member exists
311 */
312 virtual bool wait_primary_failover(const std::string &primary_server_uuid,
313 const std::chrono::seconds &timeout) = 0;
314
315 /**
316 * @brief Register observer that is notified when there is a change in the
317 * cluster nodes setup/state discovered.
318 *
319 * @param listener Observer object that is notified when cluster nodes
320 * state is changed.
321 */
322 void add_state_listener(ClusterStateListenerInterface *listener) override = 0;
323
324 /**
325 * @brief Unregister observer previously registered with add_state_listener()
326 *
327 * @param listener Observer object that should be unregistered.
328 */
329 void remove_state_listener(ClusterStateListenerInterface *listener) override =
330 0;
331
332 /**
333 * @brief Register observer that is notified when the state of listening
334 * socket acceptors should be updated on the next metadata refresh.
335 *
336 * @param listener Observer object that is notified when replicaset nodes
337 * state is changed.
338 */
339 virtual void add_acceptor_handler_listener(
340 AcceptorUpdateHandlerInterface *listener) = 0;
341
342 /**
343 * @brief Unregister observer previously registered with
344 * add_acceptor_handler_listener()
345 *
346 * @param listener Observer object that should be unregistered.
347 */
348 virtual void remove_acceptor_handler_listener(
349 AcceptorUpdateHandlerInterface *listener) = 0;
350
351 /**
352 * Register observer that is notified when the metadata refresh is triggered.
353 *
354 * @param listener Observer object that is notified on metadata refresh.
355 */
356 virtual void add_md_refresh_listener(
358
359 /**
360 * @brief Unregister observer previously registered with
361 * add_md_refresh_listener()
362 *
363 * @param listener Observer object that should be unregistered.
364 */
365 virtual void remove_md_refresh_listener(
367
368 /** @brief Get authentication data (password hash and privileges) for the
369 * given user.
370 *
371 * @param username - name of the user for which the authentidation data
372 * is requested
373 * @return true and password hash with privileges - authentication data
374 * requested for the given user.
375 * @return false and empty data set - username is not found or authentication
376 * data expired.
377 */
378 virtual std::pair<bool, std::pair<std::string, rapidjson::Document>>
379 get_rest_user_auth_data(const std::string &username) const = 0;
380
381 /**
382 * @brief Enable fetching authentication metadata when using metadata_cache
383 * http authentication backend.
384 */
385 virtual void enable_fetch_auth_metadata() = 0;
386
387 /**
388 * Force cache update in refresh loop.
389 */
390 virtual void force_cache_update() = 0;
391
392 /**
393 * Check values of auth_cache_ttl and auth_cache_refresh_interval timers.
394 *
395 * @throw std::invalid_argument for each of the following scenarios:
396 * 1. auth_cache_ttl < ttl
397 * 2. auth_cache_refresh_interval < ttl
398 * 3. auth_cache_refresh_interval > auth_cache_ttl
399 */
400 virtual void check_auth_metadata_timers() const = 0;
401
402 /**
403 * Toggle socket acceptors state update on next metadata refresh.
404 */
405 virtual void handle_sockets_acceptors_on_md_refresh() = 0;
406
407 /**
408 * Callback which is going to update the routing guidelines used by the
409 * routing guidelines engine.
410 */
412 std::function<routing_guidelines::Routing_guidelines_engine::RouteChanges(
413 const std::string &)>;
414
415 /**
416 * Callback used to verify existing connections according to the new routing
417 * guidelines.
418 */
420 const routing_guidelines::Routing_guidelines_engine::RouteChanges &)>;
421
422 virtual void add_routing_guidelines_update_callbacks(
425
426 virtual void clear_routing_guidelines_update_callbacks() = 0;
427
428 /**
429 * Callback used to update the router information used by the routing
430 * guidelines engine.
431 */
433 std::function<void(const routing_guidelines::Router_info &)>;
434
435 virtual void add_router_info_update_callback(
437
438 virtual void clear_router_info_update_callback() = 0;
439
441 // disable copy as it isn't needed right now. Feel free to enable
442 // must be explicitly defined though.
443 explicit MetadataCacheAPIBase(const MetadataCacheAPIBase &) = delete;
444 MetadataCacheAPIBase &operator=(const MetadataCacheAPIBase &) = delete;
445 ~MetadataCacheAPIBase() override = default;
446
450 std::chrono::system_clock::time_point last_refresh_succeeded;
451 std::chrono::system_clock::time_point last_refresh_failed;
452
455 };
456
459
460 virtual std::chrono::milliseconds ttl() const = 0;
461
462 using metadata_factory_t = std::function<std::shared_ptr<MetaData>(
463 mysqlrouter::ClusterType cluster_type,
465 const mysqlrouter::SSLOptions &ssl_options,
466 const bool use_cluster_notifications, unsigned view_id)>;
467
469};
470
471// This provides a factory method that returns a pluggable instance
472// to the underlying transport layer implementation. The transport
473// layer provides the means from which the metadata is
474// fetched.
475
476std::shared_ptr<MetaData> metadata_factory_get_instance(
477 const mysqlrouter::ClusterType cluster_type,
479 const mysqlrouter::SSLOptions &ssl_options, const bool use_gr_notifications,
480 const unsigned view_id);
481
483 public:
484 static MetadataCacheAPIBase *instance();
485
486 void cache_init(const mysqlrouter::ClusterType cluster_type,
487 const unsigned router_id, const std::string &clusterset_id,
488 const metadata_servers_list_t &metadata_servers,
489 const MetadataCacheTTLConfig &ttl_config,
490 const mysqlrouter::SSLOptions &ssl_options,
491 const mysqlrouter::TargetCluster &target_cluster,
492 const MetadataCacheMySQLSessionConfig &session_config,
493 const RouterAttributes &router_attributes,
494 size_t thread_stack_size, bool use_cluster_notifications,
495 const uint64_t view_id,
496 bool close_connection_after_refresh) override;
497
498 mysqlrouter::ClusterType cluster_type() const override;
499
500 void instance_name(const std::string &inst_name) override;
501 std::string instance_name() const override;
502
503 mysqlrouter::TargetCluster target_cluster() const override;
504 std::chrono::milliseconds ttl() const override;
505
506 bool is_initialized() noexcept override { return is_initialized_; }
507 void cache_start() override;
508
509 void cache_stop() noexcept override;
510
511 cluster_nodes_list_t get_cluster_nodes() override;
512 ClusterTopology get_cluster_topology() override;
513
514 bool wait_primary_failover(const std::string &primary_server_uuid,
515 const std::chrono::seconds &timeout) override;
516
517 void add_state_listener(ClusterStateListenerInterface *listener) override;
518
519 void remove_state_listener(ClusterStateListenerInterface *listener) override;
520
521 void add_acceptor_handler_listener(
522 AcceptorUpdateHandlerInterface *listener) override;
523
524 void remove_acceptor_handler_listener(
525 AcceptorUpdateHandlerInterface *listener) override;
526
527 void add_md_refresh_listener(
528 MetadataRefreshListenerInterface *listener) override;
529
530 void remove_md_refresh_listener(
531 MetadataRefreshListenerInterface *listener) override;
532
533 RefreshStatus get_refresh_status() override;
534
535 std::pair<bool, std::pair<std::string, rapidjson::Document>>
536 get_rest_user_auth_data(const std::string &user) const override;
537
538 void enable_fetch_auth_metadata() override;
539 void force_cache_update() override;
540 void check_auth_metadata_timers() const override;
541
542 void handle_sockets_acceptors_on_md_refresh() override;
543
544 void add_routing_guidelines_update_callbacks(
545 update_routing_guidelines_callback_t,
546 on_routing_guidelines_change_callback_t) override;
547
548 void clear_routing_guidelines_update_callbacks() override;
549
550 void add_router_info_update_callback(
551 update_router_info_callback_t clb) override;
552
553 void clear_router_info_update_callback() override;
554
555 void set_instance_factory(metadata_factory_t cb) override {
556 instance_factory_ = std::move(cb);
557 }
558
559 private:
561
562 struct InstData {
563 std::string name;
564 };
566
567 std::atomic<bool> is_initialized_{false};
568 MetadataCacheAPI() = default;
571};
572
573} // namespace metadata_cache
574
575#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:433
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:420
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:413
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:466
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:482
bool is_initialized() noexcept override
Definition: metadata_cache.h:506
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:157
static constexpr int kDefaultConnectTimeout
Definition: mysql_session.h:156
Definition: cluster_metadata.h:135
#define METADATA_CACHE_EXPORT
Definition: metadata_cache_export.h:15
Define rapidjson::SizeType to be std::uint64_t.
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
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:168
std::vector< ManagedInstance > cluster_nodes_list_t
Definition: metadata_cache_datatypes.h:164
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
static const size_t kDefaultStackSizeInKiloBytes
Definition: mysql_router_thread.h:44
Definition: base64.h:43
ClusterType
Definition: cluster_metadata.h:116
Definition: my_rapidjson_size_t.h:38
Definition: routing_guidelines_datatypes.h:30
Definition: gcs_xcom_synode.h:64
Represents a cluster (a GR group or AR members) and its metadata servers.
Definition: metadata_cache_datatypes.h:207
std::string last_metadata_server_host
Definition: metadata_cache.h:453
uint64_t refresh_failed
Definition: metadata_cache.h:448
std::chrono::system_clock::time_point last_refresh_failed
Definition: metadata_cache.h:451
uint16_t last_metadata_server_port
Definition: metadata_cache.h:454
uint64_t refresh_succeeded
Definition: metadata_cache.h:449
std::chrono::system_clock::time_point last_refresh_succeeded
Definition: metadata_cache.h:450
Definition: metadata_cache.h:562
std::string name
Definition: metadata_cache.h:563
Metadata MySQL session configuration.
Definition: metadata_cache_datatypes.h:247
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:263
SSL connection related options.
Definition: datatypes.h:34
double seconds()
Definition: task.cc:314