You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/12 10:20:03 UTC

[GitHub] [iotdb] choubenson commented on a diff in pull request #6967: [IOTDB-4117] fix compact bug ArithmeticException: / by zero

choubenson commented on code in PR #6967:
URL: https://github.com/apache/iotdb/pull/6967#discussion_r944322179


##########
server/src/main/java/org/apache/iotdb/db/engine/compaction/cross/utils/ReadPointCrossCompactionEstimator.java:
##########
@@ -93,8 +106,17 @@ private long calculateReadingSeqFiles(List<TsFileResource> seqResources) throws
       // it is max aligned series num of one device when tsfile contains aligned series,
       // else is sub compaction task num.
       int concurrentSeriesNum = fileInfo[2] == -1 ? subCompactionTaskNum : fileInfo[2];
-      long seqFileCost =
-          concurrentSeriesNum * (seqResource.getTsFileSize() * fileInfo[1] / fileInfo[0]);
+      long seqFileCost = 0;
+      if (fileInfo[0] == 0) { // If totalChunkNum ==0, i.e. this unSeq tsFile has no chunk.

Review Comment:
   Modify the comments as `seq tsFile`



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org