diff options
author | galaxycrab <UgnineSirdis@ydb.tech> | 2022-09-15 20:22:03 +0300 |
---|---|---|
committer | galaxycrab <UgnineSirdis@ydb.tech> | 2022-09-15 20:22:03 +0300 |
commit | 84543ee623fa69dccd62adac6f56cb0e7d9607f3 (patch) | |
tree | 7f5dd2da884599cef457f2ce98ce0f71ea0b9edb | |
parent | 85c93b9ca9dd965a0795dbfd8cb29c4ffc3ec8b9 (diff) | |
download | ydb-84543ee623fa69dccd62adac6f56cb0e7d9607f3.tar.gz |
Limit CPU for all graphs: precompute and main
-rw-r--r-- | ydb/core/yq/libs/actors/run_actor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ydb/core/yq/libs/actors/run_actor.cpp b/ydb/core/yq/libs/actors/run_actor.cpp index 366a0dd290b..7e4f2f91452 100644 --- a/ydb/core/yq/libs/actors/run_actor.cpp +++ b/ydb/core/yq/libs/actors/run_actor.cpp @@ -722,21 +722,21 @@ private: void Handle(TEvents::TEvGraphParams::TPtr& ev) { LOG_D("Graph (" << (ev->Get()->IsEvaluation ? "evaluation" : "execution") << ") with tasks: " << ev->Get()->GraphParams.TasksSize()); + if (RateLimiterPath) { + const TString rateLimiterResource = GetRateLimiterResourcePath(Params.CloudId, Params.Scope.ParseFolder(), Params.QueryId); + for (auto& task : *ev->Get()->GraphParams.MutableTasks()) { + task.SetRateLimiter(RateLimiterPath); + task.SetRateLimiterResource(rateLimiterResource); + } + } + if (ev->Get()->IsEvaluation) { auto info = RunEvalDqGraph(ev->Get()->GraphParams); info.Result = ev->Get()->Result; - EvalInfos.emplace(info.ExecuterId, info); + EvalInfos.emplace(info.ExecuterId, info); } else { DqGraphParams.push_back(ev->Get()->GraphParams); - if (RateLimiterPath) { - const TString rateLimiterResource = GetRateLimiterResourcePath(Params.CloudId, Params.Scope.ParseFolder(), Params.QueryId); - for (auto& task : *DqGraphParams.back().MutableTasks()) { - task.SetRateLimiter(RateLimiterPath); - task.SetRateLimiterResource(rateLimiterResource); - } - } - NYql::IDqGateway::TResult gatewayResult; // fake it till you make it // generate dummy result for YQL facade now, remove this gateway completely |