File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,14 @@ std::unique_ptr<IEventHandle> TKqpPlanner::AssignTasksToNodes() {
258
258
259
259
auto placingOptions = ResourceManager_->GetPlacingOptions ();
260
260
261
+ ui64 nonParallelLimit = placingOptions.MaxNonParallelTasksExecutionLimit ;
262
+ if (MayRunTasksLocally) {
263
+ // not applied to column shards and external sources
264
+ nonParallelLimit = placingOptions.MaxNonParallelDataQueryTasksLimit ;
265
+ }
266
+
261
267
bool singleNodeExecutionMakeSence = (
262
- ResourceEstimations.size () <= placingOptions. MaxNonParallelTasksExecutionLimit ||
268
+ ResourceEstimations.size () <= nonParallelLimit ||
263
269
// all readers are located on the one node.
264
270
TasksPerNode.size () == 1
265
271
);
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ class TKqpResourceManager : public IKqpResourceManager {
145
145
TPlannerPlacingOptions GetPlacingOptions () override {
146
146
return TPlannerPlacingOptions{
147
147
.MaxNonParallelTasksExecutionLimit = MaxNonParallelTasksExecutionLimit.load (),
148
+ .MaxNonParallelDataQueryTasksLimit = MaxNonParallelDataQueryTasksLimit.load (),
148
149
.MaxNonParallelTopStageExecutionLimit = MaxNonParallelTopStageExecutionLimit.load (),
149
150
.PreferLocalDatacenterExecution = PreferLocalDatacenterExecution.load (),
150
151
};
@@ -425,6 +426,7 @@ class TKqpResourceManager : public IKqpResourceManager {
425
426
MaxNonParallelTopStageExecutionLimit.store (config.GetMaxNonParallelTopStageExecutionLimit ());
426
427
MaxNonParallelTasksExecutionLimit.store (config.GetMaxNonParallelTasksExecutionLimit ());
427
428
PreferLocalDatacenterExecution.store (config.GetPreferLocalDatacenterExecution ());
429
+ MaxNonParallelDataQueryTasksLimit.store (config.GetMaxNonParallelDataQueryTasksLimit ());
428
430
}
429
431
430
432
ui32 GetNodeId () override {
@@ -474,6 +476,7 @@ class TKqpResourceManager : public IKqpResourceManager {
474
476
std::atomic<ui64> MaxNonParallelTopStageExecutionLimit = 1 ;
475
477
std::atomic<ui64> MaxNonParallelTasksExecutionLimit = 8 ;
476
478
std::atomic<bool > PreferLocalDatacenterExecution = true ;
479
+ std::atomic<ui64> MaxNonParallelDataQueryTasksLimit = 1000 ;
477
480
478
481
// current state
479
482
std::atomic<ui64> LastResourceBrokerTaskId = 0 ;
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ struct TKqpLocalNodeResources {
204
204
205
205
struct TPlannerPlacingOptions {
206
206
ui64 MaxNonParallelTasksExecutionLimit = 8 ;
207
+ ui64 MaxNonParallelDataQueryTasksLimit = 1000 ;
207
208
ui64 MaxNonParallelTopStageExecutionLimit = 1 ;
208
209
bool PreferLocalDatacenterExecution = true ;
209
210
};
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ message TTableServiceConfig {
50
50
optional uint64 MaxNonParallelTasksExecutionLimit = 25 [default = 8 ];
51
51
optional uint64 MaxNonParallelTopStageExecutionLimit = 26 [default = 1 ];
52
52
optional bool PreferLocalDatacenterExecution = 27 [ default = true ];
53
+ optional uint64 MaxNonParallelDataQueryTasksLimit = 28 [default = 1000 ];
53
54
}
54
55
55
56
message TSpillingServiceConfig {
@@ -301,6 +302,6 @@ message TTableServiceConfig {
301
302
optional uint64 QueryReplayCacheUploadTTLSec = 62 [default = 36000 ];
302
303
303
304
optional bool EnableQueryServiceSpilling = 63 [ default = true ];
304
-
305
+
305
306
optional bool EnableImplicitQueryParameterTypes = 66 [ default = false ];
306
307
};
You can’t perform that action at this time.
0 commit comments