diff options
author | Alexey Ozeritskiy <aozeritsky@gmail.com> | 2022-06-14 15:33:09 +0300 |
---|---|---|
committer | Alexey Ozeritskiy <aozeritsky@gmail.com> | 2022-06-14 15:33:09 +0300 |
commit | 6107d661e0eb4692cfd0f1266342caf3fdbcf362 (patch) | |
tree | 6841189e8fe47390e3318d90cbc9d3af3db57c2f | |
parent | d02af85169dcef35d8918cf516b9016fd8f82321 (diff) | |
download | ydb-6107d661e0eb4692cfd0f1266342caf3fdbcf362.tar.gz |
YQL-14447: Set request timeout
ref:6349bb23a879ccdd70d12d6aeeeed34ff77c3ea3
-rw-r--r-- | ydb/library/yql/providers/dq/config/config.proto | 3 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/provider/yql_dq_gateway.cpp | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ydb/library/yql/providers/dq/config/config.proto b/ydb/library/yql/providers/dq/config/config.proto index c029a5d843..023af19e50 100644 --- a/ydb/library/yql/providers/dq/config/config.proto +++ b/ydb/library/yql/providers/dq/config/config.proto @@ -145,4 +145,7 @@ message TDqConfig { optional TSolomon Solomon = 15; optional TPortoSettings PortoSettings = 16; + + optional uint64 OpenSessionTimeoutMs = 17 [default = 15000]; + optional uint64 RequestTimeoutMs = 18 [default = 720000]; } diff --git a/ydb/library/yql/providers/dq/provider/yql_dq_gateway.cpp b/ydb/library/yql/providers/dq/provider/yql_dq_gateway.cpp index 86f8af26a1..61fe4dd7d5 100644 --- a/ydb/library/yql/providers/dq/provider/yql_dq_gateway.cpp +++ b/ydb/library/yql/providers/dq/provider/yql_dq_gateway.cpp @@ -27,8 +27,8 @@ class TDqGateway: public IDqGateway }; public: - TDqGateway(const TString& host, int port, int threads, const TString& vanillaJobPath, const TString& vanillaJobMd5, TDuration timeout = TDuration::Minutes(60)) - : GrpcConf(TStringBuilder() << host << ":" << port) + TDqGateway(const TString& host, int port, int threads, const TString& vanillaJobPath, const TString& vanillaJobMd5, TDuration timeout = TDuration::Minutes(60), TDuration requestTimeout = TDuration::Max()) + : GrpcConf(TStringBuilder() << host << ":" << port, requestTimeout) , GrpcClient(1) , Service(GrpcClient.CreateGRpcServiceConnection<Yql::DqsProto::DqService>(GrpcConf)) , VanillaJobPath(vanillaJobPath) @@ -447,7 +447,8 @@ TIntrusivePtr<IDqGateway> CreateDqGateway(const NProto::TDqConfig& config) { return new TDqGateway("localhost", config.GetPort(), 8, config.GetYtBackends()[0].GetVanillaJob(), config.GetYtBackends()[0].GetVanillaJobMd5(), - TDuration::Seconds(15)); + TDuration::MilliSeconds(config.GetOpenSessionTimeoutMs()), + TDuration::MilliSeconds(config.GetRequestTimeoutMs())); } } // namespace NYql |