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

haonan pushed a commit to branch rel/0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/0.12 by this push:
     new 349656c  [IOTDB-1566] [To rel/0.12] Delete the 
configuration:concurrent_writing_time_partition (#3749)
349656c is described below

commit 349656c8159337007d9ead09393331b4e14105c5
Author: ShuanglinWu <[email protected]>
AuthorDate: Mon Aug 16 19:05:19 2021 +0800

    [IOTDB-1566] [To rel/0.12] Delete the 
configuration:concurrent_writing_time_partition (#3749)
    
    Co-authored-by: qiaojialin <[email protected]>
---
 RELEASE_NOTES.md                                         |  1 +
 .../src/assembly/resources/conf/iotdb-engine.properties  |  2 +-
 .../main/java/org/apache/iotdb/db/conf/IoTDBConfig.java  | 10 +++++-----
 .../db/engine/storagegroup/StorageGroupProcessor.java    | 16 +---------------
 4 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 64c31ec..981b476 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -32,6 +32,7 @@
 * add JMX monitor to all ThreadPools in the server module 
 
 ## Improvements
+* [IOTDB-1566] Do not restrict concurrent write partitions
 * Use StringCachedPool in TsFileResource to reduce the memory size 
 * write performance optimization when replicaNum == 1
 * Optimize Primitive Array Manager
diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties 
b/server/src/assembly/resources/conf/iotdb-engine.properties
index bf467cf..3f7178e 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -674,7 +674,7 @@ timestamp_precision=ms
 # time range for partitioning data inside each storage group, the unit is 
second
 # partition_interval=604800
 
-# concurrent_writing_time_partition=100
+# concurrent_writing_time_partition=500
 
 # admin username, default is root
 # Datatype: string
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java 
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index f1c8e11..4ffd446 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -553,7 +553,7 @@ public class IoTDBConfig {
   private String kerberosPrincipal = "your principal";
 
   /** the num of memtable in each storage group */
-  private int concurrentWritingTimePartition = 100;
+  private int concurrentWritingTimePartition = 500;
 
   /** the default fill interval in LinearFill and PreviousFill, -1 means 
infinite past time */
   private int defaultFillInterval = -1;
@@ -708,14 +708,14 @@ public class IoTDBConfig {
     this.udfInitialByteArrayLengthForMemoryControl = 
udfInitialByteArrayLengthForMemoryControl;
   }
 
-  public int getConcurrentWritingTimePartition() {
-    return concurrentWritingTimePartition;
-  }
-
   void setConcurrentWritingTimePartition(int concurrentWritingTimePartition) {
     this.concurrentWritingTimePartition = concurrentWritingTimePartition;
   }
 
+  public int getConcurrentWritingTimePartition() {
+    return concurrentWritingTimePartition;
+  }
+
   public int getDefaultFillInterval() {
     return defaultFillInterval;
   }
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 f4bdca2..c2a4dc4 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
@@ -1118,21 +1118,7 @@ public class StorageGroupProcessor {
     TsFileProcessor res = tsFileProcessorTreeMap.get(timeRangeId);
 
     if (null == res) {
-      // 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(),
-            logicalStorageGroupName);
-        asyncCloseOneTsFileProcessor(sequence, processorEntry.getValue());
-      }
-
-      // build new processor
+      // build new processor, memory control module will control the number of 
memtables
       res = newTsFileProcessor(sequence, timeRangeId);
       tsFileProcessorTreeMap.put(timeRangeId, res);
       tsFileManagement.add(res.getTsFileResource(), sequence);

Reply via email to