Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ private void readInternal(Path pathToFile, int bufferSize, EventDispatcher proce
public void deleteAllFiles() {
LOG.debug("Cleaning up any leftover files.");
File root = new File(metricsLocation);
// Filter out '.tmp' files, we do not want to delete currBucket .tmp files
String[] filesToDelete = root.list((dir, name) -> !name.endsWith(TMP_FILE_EXT));
String[] filesToDelete = root.list();
if (filesToDelete == null) {
return;
}
Comment on lines +177 to +180
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should retain filtering out .tmp files check as this might delete the currentBucket .tmp files?

deleteFiles(Arrays.asList(filesToDelete));
}

Expand Down