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

yongzao pushed a commit to branch datanode_memory_proportion
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 2c22cfb8aec28a35e7fbee0deebe6aaecd772750
Author: YongzaoDan <[email protected]>
AuthorDate: Sun Oct 29 09:31:30 2023 +0800

    Finish
---
 .../java/org/apache/iotdb/db/conf/IoTDBDescriptor.java    | 15 +++++++++++++--
 .../src/assembly/resources/conf/iotdb-common.properties   |  8 ++++----
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index e4ab5e2d392..f6b71e0ab2d 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -1700,8 +1700,17 @@ public class IoTDBDescriptor {
   }
 
   private void initMemoryAllocate(Properties properties) {
-    String memoryAllocateProportion =
-        
properties.getProperty("storage_query_schema_consensus_free_memory_proportion");
+    String memoryAllocateProportion = 
properties.getProperty("datanode_memory_proportion", null);
+    if (memoryAllocateProportion == null) {
+      memoryAllocateProportion =
+          
properties.getProperty("storage_query_schema_consensus_free_memory_proportion");
+      if (memoryAllocateProportion != null) {
+        logger.warn(
+            "The parameter 
storage_query_schema_consensus_free_memory_proportion is deprecated since 
v1.2.3, "
+                + "please use datanode_memory_proportion instead.");
+      }
+    }
+
     if (memoryAllocateProportion != null) {
       String[] proportions = memoryAllocateProportion.split(":");
       int proportionSum = 0;
@@ -1722,6 +1731,8 @@ public class IoTDBDescriptor {
         if (proportions.length >= 6) {
           conf.setAllocateMemoryForPipe(
               maxMemoryAvailable * Integer.parseInt(proportions[4].trim()) / 
proportionSum);
+        } else {
+          conf.setAllocateMemoryForPipe(0);
         }
       }
     }
diff --git 
a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties 
b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties
index 1291424562b..52d9ad8668f 100644
--- 
a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties
+++ 
b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties
@@ -172,10 +172,10 @@ cluster_name=defaultCluster
 # Datatype: boolean
 # enable_mem_control=true
 
-# Memory Allocation Ratio: StorageEngine, QueryEngine, SchemaEngine, Consensus 
and Free Memory.
-# The parameter form is a:b:c:d:e, where a, b, c, d and e are integers. for 
example: 1:1:1:1:1 , 6:2:1:1:1
-# If you have high level of writing pressure and low level of reading 
pressure, please adjust it to for example 6:1:1:1:2
-# storage_query_schema_consensus_free_memory_proportion=3:3:1:1:2
+# Memory Allocation Ratio: StorageEngine, QueryEngine, SchemaEngine, 
StreamingEngine, Consensus and Free Memory.
+# The parameter form is a:b:c:d:e:f, where a, b, c, d, e and f are integers. 
for example: 1:1:1:1:1:1 , 6:2:1:1:1:1
+# If you have high level of writing pressure and low level of reading 
pressure, please adjust it to for example 6:1:1:1:1:2
+# datanode_memory_proportion=3:3:1:1:1:1
 
 # Schema Memory Allocation Ratio: SchemaRegion, SchemaCache, and 
PartitionCache.
 # The parameter form is a:b:c, where a, b and c are integers. for example: 
1:1:1 , 6:2:1

Reply via email to