perf check 2

This commit is contained in:
Sema Checherinda 2023-11-15 19:00:27 +01:00
parent 64c2a69666
commit 6e3e6383ba
4 changed files with 16 additions and 20 deletions

View File

@ -26,7 +26,6 @@ HTTPServerSession::HTTPServerSession(const StreamSocket& socket, HTTPServerParam
_maxKeepAliveRequests(pParams->getMaxKeepAliveRequests())
{
setTimeout(pParams->getTimeout());
this->socket().setReceiveTimeout(pParams->getTimeout());
}

View File

@ -94,24 +94,22 @@ void HTTPSession::setTimeout(const Poco::Timespan& timeout)
void HTTPSession::setTimeout(const Poco::Timespan& connectionTimeout, const Poco::Timespan& sendTimeout, const Poco::Timespan& receiveTimeout)
{
_connectionTimeout = connectionTimeout;
if (_sendTimeout.totalMicroseconds() != sendTimeout.totalMicroseconds())
{
_sendTimeout = sendTimeout;
if (connected())
_socket.setSendTimeout(_sendTimeout);
}
if (_receiveTimeout.totalMicroseconds() != receiveTimeout.totalMicroseconds())
{
_receiveTimeout = receiveTimeout;
// if (_sendTimeout.totalMicroseconds() != sendTimeout.totalMicroseconds())
// {
// _sendTimeout = sendTimeout;
//
// if (connected())
// _socket.setSendTimeout(_sendTimeout);
// }
//
// if (_receiveTimeout.totalMicroseconds() != receiveTimeout.totalMicroseconds())
// {
// _receiveTimeout = receiveTimeout;
//
// if (connected())
// _socket.setReceiveTimeout(_receiveTimeout);
// }
if (connected())
_socket.setReceiveTimeout(_receiveTimeout);
}
}

View File

@ -67,7 +67,7 @@ std::unique_ptr<S3::Client> getClient(
config_prefix + ".http_keep_alive_timeout_ms", DEFAULT_HTTP_KEEP_ALIVE_TIMEOUT * 1000);
client_configuration.http_connection_pool_size = config.getUInt(config_prefix + ".http_connection_pool_size", 1000);
client_configuration.wait_on_pool_size_limit = false;
client_configuration.s3_use_adaptive_timeouts = config.getUInt(
client_configuration.s3_use_adaptive_timeouts = config.getBool(
config_prefix + ".use_adaptive_timeouts", client_configuration.s3_use_adaptive_timeouts);
/*

View File

@ -14,7 +14,6 @@
#include <Common/Stopwatch.h>
#include <Common/Throttler.h>
#include <IO/HTTPCommon.h>
#include <IO/ReadBufferFromString.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>
#include <IO/S3/ProviderType.h>