Skip to content

Commit

Permalink
Backport #22594 to 20.8: Consistent AWS timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
robot-clickhouse committed Apr 16, 2021
1 parent 359ed9e commit 8d796fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Disks/S3/registerDiskS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void registerDiskS3(DiskFactory & factory)
throw Exception("S3 path must ends with '/', but '" + uri.key + "' doesn't.", ErrorCodes::BAD_ARGUMENTS);

cfg.connectTimeoutMs = config.getUInt(config_prefix + ".connect_timeout_ms", 10000);
cfg.httpRequestTimeoutMs = config.getUInt(config_prefix + ".request_timeout_ms", 5000);
cfg.requestTimeoutMs = config.getUInt(config_prefix + ".request_timeout_ms", 5000);
cfg.endpointOverride = uri.endpoint;

auto proxy_config = getProxyConfiguration(config_prefix, config);
Expand Down
4 changes: 2 additions & 2 deletions src/IO/S3/PocoHTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ PocoHTTPClient::PocoHTTPClient(const PocoHTTPClientConfiguration & clientConfigu
: per_request_configuration(clientConfiguration.perRequestConfiguration)
, timeouts(ConnectionTimeouts(
Poco::Timespan(clientConfiguration.connectTimeoutMs * 1000), /// connection timeout.
Poco::Timespan(clientConfiguration.httpRequestTimeoutMs * 1000), /// send timeout.
Poco::Timespan(clientConfiguration.httpRequestTimeoutMs * 1000) /// receive timeout.
Poco::Timespan(clientConfiguration.requestTimeoutMs * 1000), /// send timeout.
Poco::Timespan(clientConfiguration.requestTimeoutMs * 1000) /// receive timeout.
))
, remote_host_filter(clientConfiguration.remote_host_filter)
{
Expand Down

0 comments on commit 8d796fd

Please sign in to comment.