diff options
author | aozeritsky <aozeritsky@yandex-team.ru> | 2022-02-18 16:21:12 +0300 |
---|---|---|
committer | aozeritsky <aozeritsky@yandex-team.ru> | 2022-02-18 16:21:12 +0300 |
commit | 04182a7d083f485a3364f570da83470e580c78ac (patch) | |
tree | 382d49051655b5794bd1a8a6d82d6b9d16dbf92d | |
parent | 8d57865afed51c644443d0ecf764a573c708cc00 (diff) | |
download | ydb-04182a7d083f485a3364f570da83470e580c78ac.tar.gz |
YQL-11232: Don't keep running rtmr task process
ref:0070a0a0bf9f2df5230ff841790b6f1d1d3769eb
-rw-r--r-- | ydb/library/yql/core/facade/yql_facade.cpp | 13 | ||||
-rw-r--r-- | ydb/library/yql/core/facade/yql_facade.h | 1 | ||||
-rw-r--r-- | ydb/library/yql/core/yql_data_provider.h | 1 | ||||
-rw-r--r-- | ydb/library/yql/providers/common/proto/gateways_config.proto | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/ydb/library/yql/core/facade/yql_facade.cpp b/ydb/library/yql/core/facade/yql_facade.cpp index b74abc1c34..231b751def 100644 --- a/ydb/library/yql/core/facade/yql_facade.cpp +++ b/ydb/library/yql/core/facade/yql_facade.cpp @@ -1393,4 +1393,17 @@ bool TProgram::HasActiveProcesses() { return false; } +bool TProgram::NeedWaitForActiveProcesses() { + bool flag = HasActiveProcesses(); + if (!flag) { + return false; + } + for (const auto& dp : DataProviders_) { + if (dp.WaitForActiveProcesses) { + return true; + } + } + return false; +} + } // namespace NYql diff --git a/ydb/library/yql/core/facade/yql_facade.h b/ydb/library/yql/core/facade/yql_facade.h index 1f8f47681d..586747551f 100644 --- a/ydb/library/yql/core/facade/yql_facade.h +++ b/ydb/library/yql/core/facade/yql_facade.h @@ -157,6 +157,7 @@ public: TFutureStatus ContinueAsync(); bool HasActiveProcesses(); + bool NeedWaitForActiveProcesses(); void Abort(); diff --git a/ydb/library/yql/core/yql_data_provider.h b/ydb/library/yql/core/yql_data_provider.h index 3ffbdc041d..049e97c638 100644 --- a/ydb/library/yql/core/yql_data_provider.h +++ b/ydb/library/yql/core/yql_data_provider.h @@ -193,6 +193,7 @@ struct TDataProviderInfo { TIntrusivePtr<IDataProvider> Source; TIntrusivePtr<IDataProvider> Sink; bool SupportFullResultDataSink = false; + bool WaitForActiveProcesses = true; std::function<TMaybe<TString>(const TMaybe<TSet<TString>>& usedClusters, const TMaybe<TSet<TString>>& usedProviders, ESourceSyntax syntax)> RemoteClusterProvider; diff --git a/ydb/library/yql/providers/common/proto/gateways_config.proto b/ydb/library/yql/providers/common/proto/gateways_config.proto index 8561fe2536..bda636a9a0 100644 --- a/ydb/library/yql/providers/common/proto/gateways_config.proto +++ b/ydb/library/yql/providers/common/proto/gateways_config.proto @@ -248,6 +248,7 @@ message TRtmrGatewayConfig { repeated TRtmrOperationArtifactsInfo CommonArtifacts = 6; // common artifacts for all clusters optional uint32 MaxPqPartitions = 7 [default = 10]; optional uint32 PreviewCollectTimeoutMs = 8 [default = 2000]; + optional bool KeepActiveProcess = 9 [default = false]; } ///////////////////////////// Pq ////////////////////////////// |