25#ifndef ROUTING_CLASSIC_FORWARDING_PROCESSOR_INCLUDED
26#define ROUTING_CLASSIC_FORWARDING_PROCESSOR_INCLUDED
38 using Processor::Processor;
44 std::chrono::milliseconds(100)};
61 bool noflush =
false);
72 bool noflush =
false);
87 const T &msg [[maybe_unused]]) {
SSL aware socket buffers.
Definition: channel.h:63
protocol state of a classic protocol connection.
Definition: classic_connection_base.h:54
classic_protocol::capabilities::value_type shared_capabilities() const
Definition: classic_connection_base.h:89
a processor base class with helper functions.
Definition: forwarding_processor.h:36
void reconnect_error(classic_protocol::message::server::Error err)
set the reconnect error.
Definition: forwarding_processor.h:153
classic_protocol::message::server::Error reconnect_error() const
get the reconnect error.
Definition: forwarding_processor.h:160
stdx::expected< Processor::Result, std::error_code > mysql_reconnect_start(TraceEvent *parent_event)
reconnect a mysql classic connection.
Definition: forwarding_processor.cc:138
stdx::expected< Processor::Result, std::error_code > socket_reconnect_start(TraceEvent *parent_event)
reconnect a socket.
Definition: forwarding_processor.cc:126
stdx::expected< bool, std::error_code > pool_server_connection()
move the server connection to the pool.
Definition: forwarding_processor.cc:84
stdx::expected< Result, std::error_code > forward_client_to_server(bool noflush=false)
forward the current packet from the client-side to the server-side.
Definition: forwarding_processor.cc:50
stdx::expected< Processor::Result, std::error_code > reconnect_send_error_msg(Channel *src_channel, ClassicProtocolState *src_protocol)
send a Error msg based on the reconnect_error().
Definition: forwarding_processor.cc:178
classic_protocol::message::server::Error reconnect_error_
reconnect error set by lazy_reconnect_start().
Definition: forwarding_processor.h:174
static bool connect_error_is_transient(const classic_protocol::message::server::Error &err)
check if the error is a transient error.
Definition: forwarding_processor.cc:198
static bool message_can_be_forwarded_as_is(ClassicProtocolState *src_protocol, ClassicProtocolState *dst_protocol, const T &msg)
check of the capabilities of the source and the destination are the same for this message.
Definition: forwarding_processor.h:85
stdx::expected< Result, std::error_code > forward_server_to_client(bool noflush=false)
forward the current packet from the server-side to the client-side.
Definition: forwarding_processor.cc:42
stdx::expected< Processor::Result, std::error_code > skip_or_inject_end_of_columns(bool no_flush=false)
adjust the end-of-columns packet.
Definition: forwarding_processor.cc:204
static constexpr const std::chrono::milliseconds kConnectRetryInterval
interval between connect-retries.
Definition: forwarding_processor.h:43
stdx::expected< Result, std::error_code > recv_server_failed_and_check_client_socket(std::error_code ec)
handle error-code of a failed receive() from the server-socket and check the status of the client soc...
Definition: forwarding_processor.cc:150
a processor base class with helper functions.
Definition: processor.h:90
Codec for a type.
Definition: classic_protocol_codec_base.h:71
Definition: expected.h:943
static mi_bit_type mask[]
Definition: mi_packrec.cc:140
borrowable::message::server::Error< false > Error
Definition: classic_protocol_message.h:1410
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:926
Definition: trace_span.h:34