[feature](executor) Automatically set the instance_num using the info from be. (#19345)

1. fixed some error regressions (results error with big nstance_num due to incorrect order by).
2. if set parallel_fragment_exec_instance_num to 0, the concurrency in the Pipeline execution engine will automatically be set to half of the number of CPU cores.
3. add limit to parallel_fragment_exec_instance_num that it cannot be set to more than fe.conf::max_instance_num(Default: 128)
```
mysql [(none)]>set parallel_fragment_exec_instance_num = 514;
ERROR 1231 (42000): errCode = 2, detailMessage = Variable 'parallel_fragment_exec_instance_num' can't be set to the value of '514(Should not be set to more than 128)'
```
This commit is contained in:
Mryange
2023-05-10 17:07:41 +08:00
committed by GitHub
parent 0dd35c81b4
commit d20b5f90d8
16 changed files with 230 additions and 110 deletions

View File

@ -1932,6 +1932,15 @@ public class Config extends ConfigBase {
@ConfField(mutable = true)
public static boolean disable_datev1 = true;
/*
* "max_instance_num" is used to set the maximum concurrency. When the value set
* by "parallel_fragment_exec_instance_num" is greater than "max_instance_num",
* an error will be reported.
*/
@ConfField(mutable = true)
public static int max_instance_num = 128;
/**
* This config used for export/outfile.
* Whether delete all files in the directory specified by export/outfile.