diff options
author | hor911 <hor911@ydb.tech> | 2023-12-13 23:13:26 +0300 |
---|---|---|
committer | hor911 <hor911@ydb.tech> | 2023-12-14 01:03:59 +0300 |
commit | 4bf02fc596f5fa28043002d2381d8b8c549d9b53 (patch) | |
tree | cace64101a262e130583c71648702b1671e5c26c | |
parent | bd109f0363431e600753848af39402c6e09e007a (diff) | |
download | ydb-4bf02fc596f5fa28043002d2381d8b8c549d9b53.tar.gz |
Use generic node count, not datashards only
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_data_executer.cpp | 2 | ||||
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_executer_impl.h | 4 | ||||
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_scan_executer.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp index 942b12d095..fba12d565b 100644 --- a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp @@ -1722,7 +1722,7 @@ private: } else if (StreamResult && stageInfo.Meta.IsOlap()) { BuildScanTasksFromShards(stageInfo); } else if (stageInfo.Meta.ShardOperations.empty()) { - BuildComputeTasks(stageInfo); + BuildComputeTasks(stageInfo, std::max<ui32>(ShardsOnNode.size(), ResourceSnapshot.size())); } else if (stageInfo.Meta.IsSysView()) { BuildSysViewScanTasks(stageInfo); } else { diff --git a/ydb/core/kqp/executer_actor/kqp_executer_impl.h b/ydb/core/kqp/executer_actor/kqp_executer_impl.h index 5b15bc2797..d0350fec89 100644 --- a/ydb/core/kqp/executer_actor/kqp_executer_impl.h +++ b/ydb/core/kqp/executer_actor/kqp_executer_impl.h @@ -1077,7 +1077,7 @@ protected: } } - void BuildComputeTasks(TStageInfo& stageInfo) { + void BuildComputeTasks(TStageInfo& stageInfo, const ui32 nodesCount) { auto& stage = stageInfo.Meta.GetStage(stageInfo.Id); ui32 partitionsCount = 1; @@ -1128,7 +1128,7 @@ protected: } if (isShuffle) { - partitionsCount = std::max(partitionsCount, GetMaxTasksAggregation(stageInfo, inputTasks, ShardsOnNode.size())); + partitionsCount = std::max(partitionsCount, GetMaxTasksAggregation(stageInfo, inputTasks, nodesCount)); } for (ui32 i = 0; i < partitionsCount; ++i) { diff --git a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp index b00076c0d1..047bc9e007 100644 --- a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp @@ -205,7 +205,7 @@ private: YQL_ENSURE(false, "unknown source type"); } } else if (stageInfo.Meta.ShardOperations.empty()) { - BuildComputeTasks(stageInfo); + BuildComputeTasks(stageInfo, ShardsOnNode.size()); } else if (stageInfo.Meta.IsSysView()) { BuildSysViewScanTasks(stageInfo); } else if (stageInfo.Meta.IsOlap() || stageInfo.Meta.IsDatashard()) { |