This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new c36f7144be7 Fixed concurrency issues with RegionMigration thread pool
(#12403)
c36f7144be7 is described below
commit c36f7144be70ba44800b6461f5a5079086762f0d
Author: Potato <[email protected]>
AuthorDate: Wed Apr 24 16:40:36 2024 +0800
Fixed concurrency issues with RegionMigration thread pool (#12403)
Signed-off-by: OneSizeFitQuorum <[email protected]>
---
.../org/apache/iotdb/db/service/RegionMigrateService.java | 4 +---
.../iotdb/commons/concurrent/IoTDBThreadPoolFactory.java | 12 ------------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java
index 5fea6c0a008..7061a6b5c38 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java
@@ -222,9 +222,7 @@ public class RegionMigrateService implements IService {
private final Logger poolLogger =
LoggerFactory.getLogger(RegionMigratePool.class);
private RegionMigratePool() {
- this.pool =
- IoTDBThreadPoolFactory.newCachedThreadPool(
- ThreadName.REGION_MIGRATE.getName(),
Runtime.getRuntime().availableProcessors() / 2);
+ this.pool =
IoTDBThreadPoolFactory.newCachedThreadPool(ThreadName.REGION_MIGRATE.getName());
}
@Override
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/IoTDBThreadPoolFactory.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/IoTDBThreadPoolFactory.java
index 343711f0bab..1cf5488d917 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/IoTDBThreadPoolFactory.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/IoTDBThreadPoolFactory.java
@@ -178,18 +178,6 @@ public class IoTDBThreadPoolFactory {
poolName);
}
- public static ExecutorService newCachedThreadPool(String poolName, int
maximumPoolSize) {
- logger.info(NEW_CACHED_THREAD_POOL_LOGGER_FORMAT, poolName);
- return new WrappedThreadPoolExecutor(
- 0,
- maximumPoolSize,
- 60L,
- TimeUnit.SECONDS,
- new LinkedBlockingQueue<>(),
- new IoTThreadFactory(poolName),
- poolName);
- }
-
public static ExecutorService newCachedThreadPool(
String poolName, Thread.UncaughtExceptionHandler handler) {
logger.info(NEW_CACHED_THREAD_POOL_LOGGER_FORMAT, poolName);