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 2024/07/16 04:40:57 UTC
(iotdb) branch master updated: fix compression ratio warn log (#12936)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 8075822f4fe fix compression ratio warn log (#12936)
8075822f4fe is described below
commit 8075822f4fe6a4c094b1ff8c4781aa71f97f59b3
Author: shuwenwei <55...@users.noreply.github.com>
AuthorDate: Tue Jul 16 12:40:50 2024 +0800
fix compression ratio warn log (#12936)
---
.../iotdb/db/storageengine/dataregion/flush/CompressionRatio.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java
index 1e37cb9e8ec..41fbbb4a80f 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java
@@ -85,16 +85,16 @@ public class CompressionRatio {
* call this method.
*/
public synchronized void updateRatio(long memorySize, long diskSize) throws IOException {
+ File oldFile = SystemFileFactory.INSTANCE.getFile(directory, oldFileName);
+
+ totalMemorySize.addAndGet(memorySize);
+ totalDiskSize += diskSize;
if (memorySize < 0 || totalMemorySize.get() < 0) {
LOGGER.warn(
"The compression ratio is negative, current memTableSize: {}, totalMemTableSize: {}",
memorySize,
totalMemorySize);
}
- File oldFile = SystemFileFactory.INSTANCE.getFile(directory, oldFileName);
-
- totalMemorySize.addAndGet(memorySize);
- totalDiskSize += diskSize;
File newFile =
SystemFileFactory.INSTANCE.getFile(
directory,