[ 
https://issues.apache.org/jira/browse/IOTDB-4117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578344#comment-17578344
 ] 

Bo Zhang commented on IOTDB-4117:
---------------------------------

Root-cause analysis:

==========================

Current IoTDB can generat the tsfile that has zero data 。

In this case, compact related codes will trigger  exception ( 
ArithmeticException: / by zero) when do compaction memroy estimation.

After this error happens, manual and auto compaction will always fail and can 
not self-recover.

So this is 1 critical bug of compaction.

 

> compact bug:  Exception ArithmeticException: / by zero
> ------------------------------------------------------
>
>                 Key: IOTDB-4117
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4117
>             Project: Apache IoTDB
>          Issue Type: Bug
>          Components: Core/Compaction
>            Reporter: Bo Zhang
>            Priority: Critical
>
> IoTDB report exception when doing compaction
> ==============================
> 2022-08-03 19:51:19,878 [pool-15-IoTDB-Compaction_Schedule-root.sg1-0-1] 
> ERROR o.a.i.c.c.t.ScheduledExecutorUtil:179 - Schedule task failed 
> java.lang.ArithmeticException: / by zero
>     at 
> org.apache.iotdb.db.engine.compaction.cross.utils.ReadPointCrossCompactionEstimator.calculateReadingUnseqFile(ReadPointCrossCompactionEstimator.java:80)
>     at 
> org.apache.iotdb.db.engine.compaction.cross.utils.ReadPointCrossCompactionEstimator.estimateCrossCompactionMemory(ReadPointCrossCompactionEstimator.java:59)
>     at 
> org.apache.iotdb.db.engine.compaction.cross.rewrite.selector.RewriteCompactionFileSelector.selectSourceFiles(RewriteCompactionFileSelector.java:182)
>     at 
> org.apache.iotdb.db.engine.compaction.cross.rewrite.selector.RewriteCompactionFileSelector.select(RewriteCompactionFileSelector.java:104)
>     at 
> org.apache.iotdb.db.engine.compaction.cross.rewrite.RewriteCrossSpaceCompactionSelector.selectCrossSpaceTask(RewriteCrossSpaceCompactionSelector.java:97)
>     at 
> org.apache.iotdb.db.engine.compaction.CompactionScheduler.tryToSubmitCrossSpaceCompactionTask(CompactionScheduler.java:149)
>     at 
> org.apache.iotdb.db.engine.compaction.CompactionScheduler.scheduleCompaction(CompactionScheduler.java:59)
>     at 
> org.apache.iotdb.db.engine.storagegroup.DataRegion.executeCompaction(DataRegion.java:2484)
>     at 
> org.apache.iotdb.commons.concurrent.threadpool.ScheduledExecutorUtil.lambda$scheduleWithFixedDelay$1(ScheduledExecutorUtil.java:177)
>     at 
> org.apache.iotdb.commons.concurrent.WrappedRunnable$1.runMayThrow(WrappedRunnable.java:44)
>     at 
> org.apache.iotdb.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:29)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to