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

Fix TTL may delete the source files of running comapction tasks

    XMLWordPrintableJSON

Details

    • 2021-12-Dragon

    Description

      TTL is responsible for deleting expired TsFiles. Before deleting, TTL takes the write lock of SGP and the write lock of the file, and then deletes the file. When the compaction task starts, the read locks of source files are acquired. But the acquiring process is not atomic, and because TTL does not check for the file's merging state before deleting it, it is possible for the TTL to delete the source files of a running compaction task who has not acquired all the read locks of all source files yet.

      Attachments

        Activity

          People

            ThuLiuxuxin Liuxuxin
            ThuLiuxuxin Liuxuxin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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