Skip to content

Commit ff53972

Browse files
committed
fix: runnableMap does not store complexQueryWorker threads
1 parent 691d1d1 commit ff53972

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/com/actiontech/dble/DbleServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private void initExecutor(int frontProcessorCount, int backendProcessorCount) {
303303
frontExecutor = ExecutorUtil.createFixed(FRONT_WORKER_NAME, SystemConfig.getInstance().getFrontWorker(), runnableMap);
304304
backendExecutor = ExecutorUtil.createFixed(BACKEND_WORKER_NAME, SystemConfig.getInstance().getBackendWorker(), runnableMap);
305305
writeToBackendExecutor = ExecutorUtil.createFixed(WRITE_TO_BACKEND_WORKER_NAME, SystemConfig.getInstance().getWriteToBackendWorker(), runnableMap);
306-
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexQueryWorker(), runnableMap);
306+
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexQueryWorker(), null);
307307
timerExecutor = ExecutorUtil.createFixed(TIMER_WORKER_NAME, 1);
308308
nioFrontExecutor = ExecutorUtil.createFixed(NIO_FRONT_RW, frontProcessorCount, runnableMap);
309309
nioBackendExecutor = ExecutorUtil.createFixed(NIO_BACKEND_RW, backendProcessorCount, runnableMap);

src/main/java/com/actiontech/dble/services/manager/information/tables/DbleThreadPool.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ public int updateRows(Set<LinkedHashMap<String, String>> affectPks, LinkedHashMa
123123
nameableExecutor.setCorePoolSize(corePoolSize);
124124
if (!nameableExecutor.getName().equals(DbleServer.COMPLEX_QUERY_EXECUTOR_NAME)) {
125125
nameableExecutor.setMaximumPoolSize(corePoolSize);
126-
}
127-
if (oldSize < corePoolSize) {
128-
try {
129-
increasePoolSize(nameableExecutor, corePoolSize - oldSize);
130-
} catch (IOException e) {
131-
throw new SQLException(e.getMessage(), "42S22", ErrorCode.ER_YES);
126+
if (oldSize < corePoolSize) {
127+
try {
128+
increasePoolSize(nameableExecutor, corePoolSize - oldSize);
129+
} catch (IOException e) {
130+
throw new SQLException(e.getMessage(), "42S22", ErrorCode.ER_YES);
131+
}
132+
} else if (oldSize > corePoolSize) {
133+
decreasePoolSize(nameableExecutor, oldSize - corePoolSize);
132134
}
133-
} else if (oldSize > corePoolSize) {
134-
decreasePoolSize(nameableExecutor, oldSize - corePoolSize);
135135
}
136136
//persistence
137137
try {

0 commit comments

Comments
 (0)