Merge pull request #3583 from actiontech/fix/2072-2110

fix: runnableMap does not store complexQueryWorker threads(cherry-pick)
This commit is contained in:
LUA
2023-01-06 16:32:23 +08:00
committed by GitHub
2 changed files with 9 additions and 9 deletions

View File

@@ -300,7 +300,7 @@ public final class DbleServer {
businessExecutor = ExecutorUtil.createFixed(BUSINESS_EXECUTOR_NAME, SystemConfig.getInstance().getProcessorExecutor(), runnableMap);
backendBusinessExecutor = ExecutorUtil.createFixed(BACKEND_BUSINESS_EXECUTOR_NAME, SystemConfig.getInstance().getBackendProcessorExecutor(), runnableMap);
writeToBackendExecutor = ExecutorUtil.createFixed(WRITE_TO_BACKEND_EXECUTOR_NAME, SystemConfig.getInstance().getWriteToBackendExecutor(), runnableMap);
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexExecutor(), runnableMap);
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexExecutor(), null);
timerExecutor = ExecutorUtil.createFixed(TIMER_EXECUTOR_NAME, 1);
frontExecutor = ExecutorUtil.createFixed(FRONT_EXECUTOR_NAME, FRONT_BACKEND_SUFFIX, frontProcessorCount, runnableMap);
backendExecutor = ExecutorUtil.createFixed(BACKEND_EXECUTOR_NAME, FRONT_BACKEND_SUFFIX, backendProcessorCount, runnableMap);

View File

@@ -123,15 +123,15 @@ public final class DbleThreadPool extends ManagerWritableTable {
nameableExecutor.setCorePoolSize(corePoolSize);
if (!nameableExecutor.getName().equals(DbleServer.COMPLEX_QUERY_EXECUTOR_NAME)) {
nameableExecutor.setMaximumPoolSize(corePoolSize);
}
if (oldSize < corePoolSize) {
try {
increasePoolSize(nameableExecutor, corePoolSize - oldSize);
} catch (IOException e) {
throw new SQLException(e.getMessage(), "42S22", ErrorCode.ER_YES);
if (oldSize < corePoolSize) {
try {
increasePoolSize(nameableExecutor, corePoolSize - oldSize);
} catch (IOException e) {
throw new SQLException(e.getMessage(), "42S22", ErrorCode.ER_YES);
}
} else if (oldSize > corePoolSize) {
decreasePoolSize(nameableExecutor, oldSize - corePoolSize);
}
} else if (oldSize > corePoolSize) {
decreasePoolSize(nameableExecutor, oldSize - corePoolSize);
}
//persistence
try {