iotdb
iotdb copied to clipboard
[IOTDB-5639][IOTDB-5916]Fix exception when file is deleted during compaction selection
Description
-
After copying the fileList in cross space selection, the file is deleted during the selection process, and "file not found" exception will be reported when reading the resource file or evaluating memory.
-
If the file is deleted after it is selected and before the task is added into the queue, it will cause
setStatusmethod to report an error from setting DELETED to COMPACTION_CANDIDATE. -
In the process of waiting in the queue, if the file is found to be deleted before the execution, compaction task will release all read lock and then set the status of a deleted file from DELETED to NORMAL.
Solution
- Add read lock of all files under this time partition during the process of cross space selection. Check if
See details in IOTDB-5916