jt2594838 commented on code in PR #14603:
URL: https://github.com/apache/iotdb/pull/14603#discussion_r1903399333
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/FastCompactionInnerCompactionEstimator.java:
##########
@@ -82,6 +82,9 @@ public long calculatingDataMemoryCost(CompactionTaskInfo
taskInfo) throws IOExce
@Override
public long roughEstimateInnerCompactionMemory(List<TsFileResource>
resources)
throws IOException {
+ if (config.getCompactionMaxAlignedSeriesNumInOneBatch() <= 0) {
+ return -1L;
+ }
Review Comment:
If the number < 0, then compaction will be disabled? Why is so?
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/MetadataInfo.java:
##########
@@ -23,17 +23,18 @@
class MetadataInfo {
public long metadataMemCost;
- public int maxConcurrentAlignedSeriesNum;
+ public boolean hasAlignedSeries;
public int getMaxConcurrentSeriesNum() {
+ if (!hasAlignedSeries) {
+ return
IoTDBDescriptor.getInstance().getConfig().getSubCompactionTaskNum();
+ }
int compactionMaxAlignedSeriesNumInOneBatch =
IoTDBDescriptor.getInstance().getConfig().getCompactionMaxAlignedSeriesNumInOneBatch();
compactionMaxAlignedSeriesNumInOneBatch =
- Math.min(
- compactionMaxAlignedSeriesNumInOneBatch <= 0
- ? Integer.MAX_VALUE
- : compactionMaxAlignedSeriesNumInOneBatch,
- maxConcurrentAlignedSeriesNum);
+ compactionMaxAlignedSeriesNumInOneBatch <= 0
+ ? Integer.MAX_VALUE
+ : compactionMaxAlignedSeriesNumInOneBatch;
Review Comment:
Maybe we can just avoid setting this config to a non-positive value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]