diff options
author | aneporada <aneporada@ydb.tech> | 2022-09-15 21:24:42 +0300 |
---|---|---|
committer | aneporada <aneporada@ydb.tech> | 2022-09-15 21:24:42 +0300 |
commit | 1a3ac975fcaaeb1876b2487ca6ed8fa3fd170d9f (patch) | |
tree | ec553b11574ffda0bd628718b2016b18b419bee0 | |
parent | 9b4c67e69eece7ab0dfa95628bc0a2849f2c6883 (diff) | |
download | ydb-1a3ac975fcaaeb1876b2487ca6ed8fa3fd170d9f.tar.gz |
[] Add tunable for max parallel lists
6 files changed, 7 insertions, 4 deletions
diff --git a/ydb/library/yql/providers/common/proto/gateways_config.proto b/ydb/library/yql/providers/common/proto/gateways_config.proto index c5bdd45481..63ed448a0a 100644 --- a/ydb/library/yql/providers/common/proto/gateways_config.proto +++ b/ydb/library/yql/providers/common/proto/gateways_config.proto @@ -357,6 +357,7 @@ message TS3GatewayConfig { optional uint64 MaxFilesPerQuery = 3; optional uint64 MaxReadSizePerQuery = 4; optional uint64 MaxDiscoveryFilesPerQuery = 5; + optional uint64 MaxInflightListsPerQuery = 7; repeated TAttr DefaultSettings = 100; } diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_io_discovery.cpp b/ydb/library/yql/providers/s3/provider/yql_s3_io_discovery.cpp index 8c16b913c1..ba69643da9 100644 --- a/ydb/library/yql/providers/s3/provider/yql_s3_io_discovery.cpp +++ b/ydb/library/yql/providers/s3/provider/yql_s3_io_discovery.cpp @@ -56,7 +56,7 @@ class TS3IODiscoveryTransformer : public TGraphTransformerBase { public: TS3IODiscoveryTransformer(TS3State::TPtr state, IHTTPGateway::TPtr gateway) : State_(std::move(state)) - , Lister_(IS3Lister::Make(gateway, State_->Configuration->MaxDiscoveryFilesPerQuery)) + , Lister_(IS3Lister::Make(gateway, State_->Configuration->MaxDiscoveryFilesPerQuery, State_->Configuration->MaxInflightListsPerQuery)) {} TStatus DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) final { diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_list.cpp b/ydb/library/yql/providers/s3/provider/yql_s3_list.cpp index bc88fe8234..24e7b12bfb 100644 --- a/ydb/library/yql/providers/s3/provider/yql_s3_list.cpp +++ b/ydb/library/yql/providers/s3/provider/yql_s3_list.cpp @@ -321,9 +321,9 @@ private: } -IS3Lister::TPtr IS3Lister::Make(const IHTTPGateway::TPtr& httpGateway, ui64 maxFilesPerQuery) { +IS3Lister::TPtr IS3Lister::Make(const IHTTPGateway::TPtr& httpGateway, ui64 maxFilesPerQuery, ui64 maxInflightListsPerQuery) { auto lister = IS3Lister::TPtr(new TS3Lister(httpGateway, maxFilesPerQuery)); - return IS3Lister::TPtr(new TS3ParallelLimitedLister(lister, 1)); + return IS3Lister::TPtr(new TS3ParallelLimitedLister(lister, maxInflightListsPerQuery)); } } diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_list.h b/ydb/library/yql/providers/s3/provider/yql_s3_list.h index 1a4e4798d0..5c7d4f64ea 100644 --- a/ydb/library/yql/providers/s3/provider/yql_s3_list.h +++ b/ydb/library/yql/providers/s3/provider/yql_s3_list.h @@ -35,7 +35,7 @@ public: // pathPrefix is a "constant" path prefix virtual NThreading::TFuture<TListResult> ListRegex(const TString& token, const TString& url, const TString& pattern, const TString& pathPrefix) = 0; - static TPtr Make(const IHTTPGateway::TPtr& httpGateway, ui64 maxFilesPerQuery = 0); + static TPtr Make(const IHTTPGateway::TPtr& httpGateway, ui64 maxFilesPerQuery, ui64 maxInflightListsPerQuery); }; }
\ No newline at end of file diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_settings.cpp b/ydb/library/yql/providers/s3/provider/yql_s3_settings.cpp index 0e20428dd4..ccd0f2a5c9 100644 --- a/ydb/library/yql/providers/s3/provider/yql_s3_settings.cpp +++ b/ydb/library/yql/providers/s3/provider/yql_s3_settings.cpp @@ -35,6 +35,7 @@ void TS3Configuration::Init(const TS3GatewayConfig& config, TIntrusivePtr<TTypeA MaxFilesPerQuery = config.HasMaxFilesPerQuery() ? config.GetMaxFilesPerQuery() : 7000; MaxDiscoveryFilesPerQuery = config.HasMaxDiscoveryFilesPerQuery() ? config.GetMaxDiscoveryFilesPerQuery() : 9000; MaxReadSizePerQuery = config.HasMaxReadSizePerQuery() ? config.GetMaxReadSizePerQuery() : 4_GB; + MaxInflightListsPerQuery = config.HasMaxInflightListsPerQuery() ? config.GetMaxInflightListsPerQuery() : 1; TVector<TString> clusters(Reserve(config.ClusterMappingSize())); for (auto& cluster: config.GetClusterMapping()) { diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_settings.h b/ydb/library/yql/providers/s3/provider/yql_s3_settings.h index 7e583367fb..bbfdef5d0d 100644 --- a/ydb/library/yql/providers/s3/provider/yql_s3_settings.h +++ b/ydb/library/yql/providers/s3/provider/yql_s3_settings.h @@ -41,6 +41,7 @@ struct TS3Configuration : public TS3Settings, public NCommon::TSettingDispatcher ui64 MaxFilesPerQuery; ui64 MaxDiscoveryFilesPerQuery; ui64 MaxReadSizePerQuery; + ui64 MaxInflightListsPerQuery; }; } // NYql |