[Bug] Fix bug that task_worker_pool not work (#4543)

The number of thread initialized in task worker pool is not right.
This bug is introduced from #4440
This commit is contained in:
Mingyu Chen
2020-09-08 09:25:36 +08:00
committed by GitHub
parent 8be04fac64
commit e55327bbc7
2 changed files with 6 additions and 2 deletions

View File

@ -192,8 +192,10 @@ void TaskWorkerPool::start() {
.set_max_threads(_worker_count)
.build(&_thread_pool);
auto st = _thread_pool->submit_func(cb);
CHECK(st.ok()) << st.to_string();
for (int i = 0; i < _worker_count; i++) {
auto st = _thread_pool->submit_func(cb);
CHECK(st.ok()) << st.to_string();
}
#endif
}

View File

@ -18,6 +18,7 @@
package org.apache.doris.analysis;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.Config;
import org.apache.doris.qe.ConnectContext;
import org.apache.doris.planner.Planner;
import org.apache.doris.qe.VariableMgr;
@ -47,6 +48,7 @@ public class SelectStmtTest {
@BeforeClass
public static void setUp() throws Exception {
Config.enable_batch_delete_by_default = true;
UtFrameUtils.createMinDorisCluster(runningDir);
String createTblStmtStr = "create table db1.tbl1(k1 varchar(32), k2 varchar(32), k3 varchar(32), k4 int) "
+ "AGGREGATE KEY(k1, k2,k3,k4) distributed by hash(k1) buckets 3 properties('replication_num' = '1');";