Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
master branch, 1.0.0
-
None
-
2023-1-Storage
Description
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.