Browse Source

Configurable MaxTasksPerStage Hard Limit

hor911 2 years ago
parent
commit
d7b9667f8f

+ 3 - 1
ydb/core/yq/libs/actors/run_actor.cpp

@@ -282,6 +282,7 @@ public:
         , CreatedAt(Params.CreatedAt)
         , QueryCounters(queryCounters)
         , EnableCheckpointCoordinator(Params.QueryType == YandexQuery::QueryContent::STREAMING && Params.CheckpointCoordinatorConfig.GetEnabled())
+        , MaxTasksPerStage(Params.CommonConfig.GetMaxTasksPerStage() ? Params.CommonConfig.GetMaxTasksPerStage() : 500)
         , MaxTasksPerOperation(Params.CommonConfig.GetMaxTasksPerOperation() ? Params.CommonConfig.GetMaxTasksPerOperation() : 40)
         , Compressor(Params.CommonConfig.GetQueryArtifactsCompressionMethod(), Params.CommonConfig.GetQueryArtifactsCompressionMinSize())
     {
@@ -1415,7 +1416,7 @@ private:
             }
         };
 
-        apply("MaxTasksPerStage", "500");
+        apply("MaxTasksPerStage", ToString(MaxTasksPerStage));
         apply("MaxTasksPerOperation", ToString(MaxTasksPerOperation));
         apply("EnableComputeActor", "1");
         apply("ComputeActorType", "async");
@@ -1963,6 +1964,7 @@ private:
     bool EnableCheckpointCoordinator = false;
     Fq::Private::PingTaskRequest QueryStateUpdateRequest;
 
+    const ui64 MaxTasksPerStage;
     const ui64 MaxTasksPerOperation;
     const TCompressor Compressor;
 

+ 1 - 0
ydb/core/yq/libs/config/protos/common.proto

@@ -24,4 +24,5 @@ message TCommonConfig {
     string QueryArtifactsCompressionMethod = 9;
     uint64 QueryArtifactsCompressionMinSize = 10;
     string MonitoringEndpoint = 11;
+    uint64 MaxTasksPerStage = 12;
 }