Skip to content

Commit dd23faf

Browse files
authored
Merge pull request #3583 from actiontech/fix/2072-2110
fix: runnableMap does not store complexQueryWorker threads(cherry-pick)
2 parents d4920d0 + 2d86dac commit dd23faf

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
@@ -300,7 +300,7 @@ private void initExecutor(int frontProcessorCount, int backendProcessorCount) {
300300
businessExecutor = ExecutorUtil.createFixed(BUSINESS_EXECUTOR_NAME, SystemConfig.getInstance().getProcessorExecutor(), runnableMap);
301301
backendBusinessExecutor = ExecutorUtil.createFixed(BACKEND_BUSINESS_EXECUTOR_NAME, SystemConfig.getInstance().getBackendProcessorExecutor(), runnableMap);
302302
writeToBackendExecutor = ExecutorUtil.createFixed(WRITE_TO_BACKEND_EXECUTOR_NAME, SystemConfig.getInstance().getWriteToBackendExecutor(), runnableMap);
303-
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexExecutor(), runnableMap);
303+
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexExecutor(), null);
304304
timerExecutor = ExecutorUtil.createFixed(TIMER_EXECUTOR_NAME, 1);
305305
frontExecutor = ExecutorUtil.createFixed(FRONT_EXECUTOR_NAME, FRONT_BACKEND_SUFFIX, frontProcessorCount, runnableMap);
306306
backendExecutor = ExecutorUtil.createFixed(BACKEND_EXECUTOR_NAME, FRONT_BACKEND_SUFFIX, 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)