26#ifndef ROUTING_CLASSIC_LAZY_CONNECT_INCLUDED
27#define ROUTING_CLASSIC_LAZY_CONNECT_INCLUDED
29#include <system_error>
114 const std::optional<classic_protocol::message::server::Error> &
err) {
118 std::optional<classic_protocol::message::server::Error>
failed()
const {
162 std::chrono::steady_clock::now()};
164 std::optional<classic_protocol::message::server::Error>
failed_;
a processor base class with helper functions.
Definition: forwarding_processor.h:38
attach a server connection and initialize it.
Definition: classic_lazy_connect.h:49
stdx::expected< Processor::Result, std::error_code > fallback_to_write()
Definition: classic_lazy_connect.cc:889
stdx::expected< Processor::Result, std::error_code > authenticated()
Definition: classic_lazy_connect.cc:495
stdx::expected< Processor::Result, std::error_code > set_vars_done()
Definition: classic_lazy_connect.cc:653
void failed(const std::optional< classic_protocol::message::server::Error > &err)
Definition: classic_lazy_connect.h:113
stdx::expected< Processor::Result, std::error_code > connected()
the handshake part.
Definition: classic_lazy_connect.cc:391
stdx::expected< Processor::Result, std::error_code > set_server_option_done()
Definition: classic_lazy_connect.cc:695
stdx::expected< Processor::Result, std::error_code > process() override
Definition: classic_lazy_connect.cc:231
stdx::expected< Processor::Result, std::error_code > wait_gtid_executed()
Definition: classic_lazy_connect.cc:814
stdx::expected< Processor::Result, std::error_code > fetch_sys_vars_done()
Definition: classic_lazy_connect.cc:755
stdx::expected< Processor::Result, std::error_code > set_trx_characteristics()
Definition: classic_lazy_connect.cc:936
std::function< void(const classic_protocol::message::server::Error &err)> on_error_
Definition: classic_lazy_connect.h:155
stdx::expected< Processor::Result, std::error_code > set_schema_done()
Definition: classic_lazy_connect.cc:790
TraceEvent * trace_event_authenticate_
Definition: classic_lazy_connect.h:170
std::string trx_stmt_
Definition: classic_lazy_connect.h:166
stdx::expected< Processor::Result, std::error_code > from_stash()
Definition: classic_lazy_connect.cc:306
stdx::expected< Processor::Result, std::error_code > wait_gtid_executed_done()
Definition: classic_lazy_connect.cc:857
Stage stage_
Definition: classic_lazy_connect.h:148
stdx::expected< Processor::Result, std::error_code > pool_or_close()
Definition: classic_lazy_connect.cc:880
TraceEvent * trace_event_set_schema_
Definition: classic_lazy_connect.h:173
TraceEvent * trace_event_fallback_to_write_
Definition: classic_lazy_connect.h:176
RouterRequireFetcher::Result required_connection_attributes_fetcher_result_
Definition: classic_lazy_connect.h:152
stdx::expected< Processor::Result, std::error_code > set_schema()
Definition: classic_lazy_connect.cc:766
bool already_fallback_
Definition: classic_lazy_connect.h:158
bool retry_connect_
Definition: classic_lazy_connect.h:157
bool in_handshake_
Definition: classic_lazy_connect.h:150
stdx::expected< Processor::Result, std::error_code > fetch_sys_vars()
Definition: classic_lazy_connect.cc:713
std::optional< classic_protocol::message::server::Error > failed_
Definition: classic_lazy_connect.h:164
LazyConnector(MysqlRoutingClassicConnectionBase *conn, bool in_handshake, std::function< void(const classic_protocol::message::server::Error &err)> on_error, TraceEvent *parent_event)
create a lazy-connector.
Definition: classic_lazy_connect.h:63
TraceEvent * trace_event_wait_gtid_executed_
Definition: classic_lazy_connect.h:174
TraceEvent * trace_event_set_trx_characteristics_
Definition: classic_lazy_connect.h:177
std::chrono::steady_clock::time_point started_
Definition: classic_lazy_connect.h:161
stdx::expected< Processor::Result, std::error_code > send_auth_ok()
Definition: classic_lazy_connect.cc:1043
stdx::expected< Processor::Result, std::error_code > fetch_user_attrs_done()
Definition: classic_lazy_connect.cc:1015
TraceEvent * trace_event_set_vars_
Definition: classic_lazy_connect.h:171
TraceEvent * trace_event_fetch_sys_vars_
Definition: classic_lazy_connect.h:172
stdx::expected< Processor::Result, std::error_code > set_trx_characteristics_done()
Definition: classic_lazy_connect.cc:976
stdx::expected< Processor::Result, std::error_code > set_server_option()
Definition: classic_lazy_connect.cc:667
Stage stage() const
Definition: classic_lazy_connect.h:104
Stage
Definition: classic_lazy_connect.h:73
@ SetTrxCharacteristicsDone
stdx::expected< Processor::Result, std::error_code > connect()
Definition: classic_lazy_connect.cc:364
TraceEvent * trace_event_check_read_only_
Definition: classic_lazy_connect.h:175
stdx::expected< Processor::Result, std::error_code > fetch_user_attrs()
Definition: classic_lazy_connect.cc:996
TraceEvent * parent_event_
Definition: classic_lazy_connect.h:168
TraceEvent * trace_event_connect_
Definition: classic_lazy_connect.h:169
std::optional< classic_protocol::message::server::Error > failed() const
Definition: classic_lazy_connect.h:118
void stage(Stage stage)
Definition: classic_lazy_connect.h:103
stdx::expected< Processor::Result, std::error_code > init()
Definition: classic_lazy_connect.cc:299
stdx::expected< Processor::Result, std::error_code > set_vars()
Definition: classic_lazy_connect.cc:562
Definition: classic_connection_base.h:56
Definition: expected.h:286
borrowable::message::server::Error< false > Error
Definition: classic_protocol_message.h:1411
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:908
Definition: gcs_xcom_synode.h:64
Definition: classic_lazy_connect.h:106
std::optional< bool > x509
Definition: classic_lazy_connect.h:108
std::optional< std::string > subject
Definition: classic_lazy_connect.h:110
std::optional< std::string > issuer
Definition: classic_lazy_connect.h:109
std::optional< bool > ssl
Definition: classic_lazy_connect.h:107
Definition: trace_span.h:35