You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/08/02 08:15:37 UTC
[iotdb] branch ca_performance updated: make field static
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ca_performance
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/ca_performance by this push:
new 166584fda11 make field static
166584fda11 is described below
commit 166584fda116d9e4aa59886aed9b70595c6d021d
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Aug 2 16:15:28 2023 +0800
make field static
---
.../plan/scheduler/FragmentInstanceDispatcherImpl.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java
index de756c792b3..72158074972 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java
@@ -94,9 +94,9 @@ public class FragmentInstanceDispatcherImpl implements IFragInstanceDispatcher {
private static final String UNEXPECTED_ERRORS = "Unexpected errors: ";
- private final Lock queueLock = new ReentrantLock();
+ private static final Lock QUEUE_LOCK = new ReentrantLock();
- private final Map<Integer, ExecutorService> dataRegionQueueMap = new HashMap<>();
+ private static final Map<Integer, ExecutorService> DATA_REGION_QUEUE_MAP = new HashMap<>();
public FragmentInstanceDispatcherImpl(
QueryType type,
@@ -208,17 +208,17 @@ public class FragmentInstanceDispatcherImpl implements IFragInstanceDispatcher {
if (localInstances.get(0).getRegionReplicaSet().regionId.type
== TConsensusGroupType.DataRegion) {
List<Future<Void>> resList = new ArrayList<>(localInstances.size());
- queueLock.lock();
+ QUEUE_LOCK.lock();
try {
for (FragmentInstance localInstance : localInstances) {
try {
int regionId = localInstance.getRegionReplicaSet().getRegionId().id;
- ExecutorService executorService = dataRegionQueueMap.get(regionId);
+ ExecutorService executorService = DATA_REGION_QUEUE_MAP.get(regionId);
if (executorService == null) {
executorService =
IoTDBThreadPoolFactory.newFixedThreadPool(
1, ThreadName.DATA_REGION_CONSUMER.getName() + "-" + regionId);
- dataRegionQueueMap.put(regionId, executorService);
+ DATA_REGION_QUEUE_MAP.put(regionId, executorService);
}
resList.add(executorService.submit(new writeFITask(localInstance)));
} catch (Throwable t) {
@@ -229,7 +229,7 @@ public class FragmentInstanceDispatcherImpl implements IFragInstanceDispatcher {
}
}
} finally {
- queueLock.unlock();
+ QUEUE_LOCK.unlock();
}
for (Future<Void> future : resList) {