Minor fixes

This commit is contained in:
Pavel Kruglov 2021-02-17 20:44:11 +03:00
parent 1b78de2142
commit bc6fe4f28c
4 changed files with 11 additions and 11 deletions

View File

@ -66,10 +66,10 @@ void Connection::connect(const ConnectionTimeouts & timeouts)
disconnect();
LOG_TRACE(log_wrapper.get(), "Connecting. Database: {}. User: {}{}{}",
default_database.empty() ? "(not specified)" : default_database,
user,
static_cast<bool>(secure) ? ". Secure" : "",
static_cast<bool>(compression) ? "" : ". Uncompressed");
default_database.empty() ? "(not specified)" : default_database,
user,
static_cast<bool>(secure) ? ". Secure" : "",
static_cast<bool>(compression) ? "" : ". Uncompressed");
if (static_cast<bool>(secure))
{
@ -103,7 +103,7 @@ void Connection::connect(const ConnectionTimeouts & timeouts)
#if defined(TCP_KEEPALIVE)
TCP_KEEPALIVE
#else
TCP_KEEPIDLE // __APPLE__
TCP_KEEPIDLE // __APPLE__
#endif
, timeouts.tcp_keep_alive_timeout);
}
@ -120,7 +120,7 @@ void Connection::connect(const ConnectionTimeouts & timeouts)
receiveHello();
LOG_TRACE(log_wrapper.get(), "Connected to {} server version {}.{}.{}.",
server_name, server_version_major, server_version_minor, server_version_patch);
server_name, server_version_major, server_version_minor, server_version_patch);
}
catch (Poco::Net::NetException & e)
{
@ -151,6 +151,7 @@ void Connection::disconnect()
connected = false;
}
void Connection::sendHello()
{
/** Disallow control characters in user controlled parameters
@ -206,6 +207,7 @@ void Connection::sendHello()
out->next();
}
void Connection::receiveHello()
{
/// Receive hello packet.
@ -337,6 +339,8 @@ void Connection::sendClusterNameAndSalt()
bool Connection::ping()
{
// LOG_TRACE(log_wrapper.get(), "Ping");
TimeoutSetter timeout_setter(*socket, sync_request_timeout, true);
try
{

View File

@ -196,6 +196,7 @@ public:
Poco::Net::Socket * getSocket() { return socket.get(); }
/// Each time read from socket blocks and async_callback is set, it will be called. You can poll socket inside it.
void setAsyncCallback(AsyncCallback async_callback_)
{
async_callback = std::move(async_callback_);

View File

@ -31,7 +31,6 @@ enum class PoolMode
GET_ALL
};
class ConnectionPoolWithFailover : public IConnectionPool, private PoolWithFailoverBase<IConnectionPool>
{
public:

View File

@ -166,11 +166,7 @@ def test_load_balancing_priority_round_robin(dist_table):
def test_distributed_replica_max_ignored_errors():
settings = {
<<<<<<< Updated upstream
'use_hedged_requests' : 0,
=======
'use_hedged_requests': 0,
>>>>>>> Stashed changes
'load_balancing': 'in_order',
'prefer_localhost_replica': 0,
'connect_timeout': 2,