Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-5206

Fix when target file is deleted in Compaction exception handler and recover

    XMLWordPrintableJSON

Details

    • 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.

      Attachments

        Activity

          People

            ChouBenson 周沛辰
            ChouBenson 周沛辰
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 72h
                72h
                Remaining:
                Remaining Estimate - 72h
                72h
                Logged:
                Time Spent - Not Specified
                Not Specified