Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
master branch, 0.13.0, 1.0.0
-
None
-
2022-12-Storage
Description
Description
The process of compaction selecting files may throws No Such File exception and RunTimeException, causing compaction schedule thread to get stuck.
Reason
The process of selecting file does not add read locks of the source files. Assuming that the file was not deleted at the moment the deleted file was filtered, but was later deleted, No such file exception would be thrown when the reader for the file was built, and a RunTimeException would be thrown when the state was set to CompactionCandidate. Among them, the fix scheduled thread of compaction stops on 0.13, but not on master and 1.0.
Solution
Do an exception catch when submitting a task in CompactionTaskManager. If an exception is caught, discard the task and return false.
When building a reader for a file, throw IOException instead of NPE if the file does not exist