fix: runnableMap does not store complexQueryWorker threads

This commit is contained in:
guoaomen
2023-01-06 13:21:16 +08:00
parent 691d1d1345
commit ff53972c4a
2 changed files with 9 additions and 9 deletions
@@ -303,7 +303,7 @@ public final class DbleServer {
frontExecutor = ExecutorUtil.createFixed(FRONT_WORKER_NAME, SystemConfig.getInstance().getFrontWorker(), runnableMap);
backendExecutor = ExecutorUtil.createFixed(BACKEND_WORKER_NAME, SystemConfig.getInstance().getBackendWorker(), runnableMap);
writeToBackendExecutor = ExecutorUtil.createFixed(WRITE_TO_BACKEND_WORKER_NAME, SystemConfig.getInstance().getWriteToBackendWorker(), runnableMap);
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexQueryWorker(), runnableMap);
complexQueryExecutor = ExecutorUtil.createCached(COMPLEX_QUERY_EXECUTOR_NAME, SystemConfig.getInstance().getComplexQueryWorker(), null);
timerExecutor = ExecutorUtil.createFixed(TIMER_WORKER_NAME, 1);
nioFrontExecutor = ExecutorUtil.createFixed(NIO_FRONT_RW, frontProcessorCount, runnableMap);
nioBackendExecutor = ExecutorUtil.createFixed(NIO_BACKEND_RW, backendProcessorCount, runnableMap);
@@ -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 {