You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xu...@apache.org on 2021/04/23 02:06:19 UTC

[iotdb] 01/01: use memory control module to remove old partition

This is an automated email from the ASF dual-hosted git repository.

xuekaifeng pushed a commit to branch use-mem-control-to-remove-old-partition
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 84f0523ed7f4d062e8609eee8a380d771429561c
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Fri Apr 23 10:05:58 2021 +0800

    use memory control module to remove old partition
---
 .../db/engine/storagegroup/StorageGroupProcessor.java     | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index 9c9db9f..074d1d5 100755
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -1058,20 +1058,7 @@ public class StorageGroupProcessor {
     writeLock();
     try {
       if (!tsFileProcessorTreeMap.containsKey(timeRangeId)) {
-        // we have to remove oldest processor to control the num of the memtables
-        // TODO: use a method to control the number of memtables
-        if (tsFileProcessorTreeMap.size()
-            >= IoTDBDescriptor.getInstance().getConfig().getConcurrentWritingTimePartition()) {
-          Map.Entry<Long, TsFileProcessor> processorEntry = tsFileProcessorTreeMap.firstEntry();
-          logger.info(
-              "will close a {} TsFile because too many active partitions ({} > {}) in the storage group {},",
-              sequence,
-              tsFileProcessorTreeMap.size(),
-              IoTDBDescriptor.getInstance().getConfig().getConcurrentWritingTimePartition(),
-              storageGroupName);
-          asyncCloseOneTsFileProcessor(sequence, processorEntry.getValue());
-        }
-
+        // memory control module will control the number of memtables
         // build new processor
         TsFileProcessor newProcessor = createTsFileProcessor(sequence, timeRangeId);
         tsFileProcessorTreeMap.put(timeRangeId, newProcessor);