You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2026/05/06 06:45:50 UTC
(iotdb) 03/03: fix review
This is an automated email from the ASF dual-hosted git repository.
HTHou pushed a commit to branch codex/cherry-pick-16724-dev-1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit e0f449833deb34717d81305325287ca7eb8dc72f
Author: HTHou <ha...@apache.org>
AuthorDate: Mon Nov 10 15:34:12 2025 +0800
fix review
---
.../main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 16 +++++++---------
.../resources/conf/iotdb-system.properties.template | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 06b61fd9283..5e89c4ec083 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -868,10 +868,7 @@ public class IoTDBConfig {
private float udfCollectorMemoryBudgetInMB = (float) (1.0 / 3 * udfMemoryBudgetInMB);
/** Unit: byte */
- private int thriftMaxFrameSize =
- Math.min(
- 64 * 1024 * 1024,
- (int) Math.min(Runtime.getRuntime().maxMemory() / 64, Integer.MAX_VALUE));
+ private int thriftMaxFrameSize = getDefaultThriftMaxFrameSize();
private int thriftDefaultBufferSize = RpcUtils.THRIFT_DEFAULT_BUF_CAPACITY;
@@ -2788,14 +2785,15 @@ public class IoTDBConfig {
public void setThriftMaxFrameSize(int thriftMaxFrameSize) {
this.thriftMaxFrameSize =
- thriftMaxFrameSize <= 0
- ? Math.min(
- 64 * 1024 * 1024,
- (int) Math.min(Runtime.getRuntime().maxMemory() / 64, Integer.MAX_VALUE))
- : thriftMaxFrameSize;
+ thriftMaxFrameSize <= 0 ? getDefaultThriftMaxFrameSize() : thriftMaxFrameSize;
BaseRpcTransportFactory.setThriftMaxFrameSize(this.thriftMaxFrameSize);
}
+ private static int getDefaultThriftMaxFrameSize() {
+ return Math.min(
+ 64 * 1024 * 1024, (int) Math.min(Runtime.getRuntime().maxMemory() / 64, Integer.MAX_VALUE));
+ }
+
public int getThriftDefaultBufferSize() {
return thriftDefaultBufferSize;
}
diff --git a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template
index e3b1e4da1bb..c7862e4886e 100644
--- a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template
+++ b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template
@@ -509,7 +509,7 @@ dn_rpc_min_concurrent_client_num=1
# Datatype: int
dn_rpc_max_concurrent_client_num=1000
-# thrift max frame size in bytes, When = 0, use min(64MB, datanode heap memory / 64)
+# thrift max frame size in bytes. When set to 0, use min(64MB, datanode heap memory / 64)
# effectiveMode: restart
# Datatype: int
dn_thrift_max_frame_size=0