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/07/25 11:49:26 UTC
[iotdb] branch master updated: fix cross memory estimation (#10668)
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr 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 5bb6362f166 fix cross memory estimation (#10668)
5bb6362f166 is described below
commit 5bb6362f16646d7ff624d92bcb66e24ec5935827
Author: Zhijia Cao <ca...@126.com>
AuthorDate: Tue Jul 25 19:49:20 2023 +0800
fix cross memory estimation (#10668)
---
.../estimator/ReadPointCrossCompactionEstimator.java | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/ReadPointCrossCompactionEstimator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/ReadPointCrossCompactionEstimator.java
index dbe3130b231..318420a831f 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/ReadPointCrossCompactionEstimator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/ReadPointCrossCompactionEstimator.java
@@ -119,9 +119,15 @@ public class ReadPointCrossCompactionEstimator extends AbstractCrossSpaceEstimat
return 0;
}
// it means the max size of a timeseries in this file when reading all of its chunk into memory.
- return compressionRatio
- * concurrentSeriesNum
- * (unseqResource.getTsFileSize() * fileInfo.maxSeriesChunkNum / fileInfo.totalChunkNum);
+
+ long resourceFileSize =
+ compressionRatio
+ * concurrentSeriesNum
+ * (unseqResource.getTsFileSize() * fileInfo.maxSeriesChunkNum / fileInfo.totalChunkNum);
+
+ // add mod file size
+ long modFileSize = unseqResource.getModFile().getSize();
+ return resourceFileSize + modFileSize;
}
/**
@@ -167,6 +173,9 @@ public class ReadPointCrossCompactionEstimator extends AbstractCrossSpaceEstimat
cost += seqFileCost;
maxCostOfReadingSeqFile = seqFileCost;
}
+
+ // add mod file size
+ cost += seqResource.getModFile().getSize();
}
return cost;
}