mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Minor fixes
This commit is contained in:
parent
1b78de2142
commit
bc6fe4f28c
@ -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
|
||||
{
|
||||
|
@ -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_);
|
||||
|
@ -31,7 +31,6 @@ enum class PoolMode
|
||||
GET_ALL
|
||||
};
|
||||
|
||||
|
||||
class ConnectionPoolWithFailover : public IConnectionPool, private PoolWithFailoverBase<IConnectionPool>
|
||||
{
|
||||
public:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user