Skip to content

Commit

Permalink
Merge pull request #3583 from actiontech/fix/2072-2110
Browse files Browse the repository at this point in the history
fix: runnableMap does not store complexQueryWorker threads(cherry-pick)
  • Loading branch information
LUAgam authored Jan 6, 2023
2 parents d4920d0 + 2d86dac commit dd23faf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/actiontech/dble/DbleServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private void initExecutor(int frontProcessorCount, int backendProcessorCount) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ public int updateRows(Set<LinkedHashMap<String, String>> affectPks, LinkedHashMa
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 {
Expand Down

0 comments on commit dd23faf

Please sign in to comment.