You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/06/30 02:29:40 UTC
[iotdb] branch fix_wal_throttle_log created (now dddd629fb27)
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a change to branch fix_wal_throttle_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at dddd629fb27 fix the error in wal throttle log which print wrong threshold
This branch includes the following new commits:
new dddd629fb27 fix the error in wal throttle log which print wrong threshold
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: fix the error in wal throttle log which print wrong threshold
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch fix_wal_throttle_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit dddd629fb2771db0c6732ff9cd903e214123f3f9
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Fri Jun 30 10:29:29 2023 +0800
fix the error in wal throttle log which print wrong threshold
---
.../apache/iotdb/db/storageengine/dataregion/wal/WALManager.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
index 26d87dffa5b..96dd53dd411 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
@@ -181,7 +181,7 @@ public class WALManager implements IService {
logger.warn(
"WAL disk usage {} is larger than the iot_consensus_throttle_threshold_in_byte {}, please check your write load, iot consensus and the pipe module. It's better to allocate more disk for WAL.",
getTotalDiskUsage(),
- config.getThrottleThreshold());
+ getThrottleThreshold());
}
}
@@ -204,7 +204,11 @@ public class WALManager implements IService {
}
public boolean shouldThrottle() {
- return getTotalDiskUsage() >= config.getThrottleThreshold() * 0.8;
+ return getTotalDiskUsage() >= getThrottleThreshold();
+ }
+
+ public long getThrottleThreshold() {
+ return (long) (config.getThrottleThreshold() * 0.8);
}
public long getTotalDiskUsage() {