forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle Windows delete pending files (elastic#12335)
When deleting temporary files created by the DLQ writer to store data before moving to their final location, Windows may leave these files in a "delete pending" state, where the files are somewhat in a state of limbo, where they result of `Files.exist(filename)` is `false`, but the result of `filename.toFile().exists()` is true. When files are in this state, a new file with the same name cannot be created, which causes the DLQ test used to ensure that closing and reopening the DLQ (in such events as a pipeline restart) to fail. This commit moves the temporary file to an alternative location before deletion, ensuring that the "pending delete" status does not interrupt with the DLQ startup
- Loading branch information
Showing
1 changed file
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters