[
https://issues.apache.org/jira/browse/IOTDB-5206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681993#comment-17681993
]
Jinrui Zhang commented on IOTDB-5206:
-------------------------------------
The fix is approved but not merged because of IT failures
> Fix when target file is deleted in Compaction exception handler and recover
> ---------------------------------------------------------------------------
>
> Key: IOTDB-5206
> URL: https://issues.apache.org/jira/browse/IOTDB-5206
> Project: Apache IoTDB
> Issue Type: Bug
> Affects Versions: master branch, 1.0.0
> Reporter: 周沛辰
> Assignee: 周沛辰
> Priority: Major
> Labels: pull-request-available
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> *Description*
> After compaction, if the target file is empty, its corresponding disk file
> will be deleted. If an exception or system interruption occurs, there will be
> problems in restart recovery and set allowCompaction to false.
> 2022-12-20 09:23:53,086 [pool-12-IoTDB-Recovery-Thread-Pool-1] ERROR
> o.a.i.d.e.c.t.CompactionRecoverTask:300 - root.iot-0
> [Compaction][ExceptionHandler] target file
> sequence/root.iot/0/0/1670572962795-1051-2-1.inner is not complete, and some
> source files is lost, do nothing. Set allowCompaction to false
> 2022-12-20 09:23:53,087 [pool-12-IoTDB-Recovery-Thread-Pool-1] ERROR
> o.a.i.d.e.c.t.CompactionRecoverTask:133 - root.iot-0 [Compaction][Recover]
> Failed to recover compaction, set allowCompaction to false
> *Reason*
> Empty target files will be deleted in compaction. In recovery, system will
> report source files are lost and empty target file has been deleted.
> *Solution*
> Empty target files are not deleted during the compaction until the end of the
> compaction. However, after recovery, the empty target file will not be
> deleted, but it will not affect the correctness of the system.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)