-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: refactor obsolete file deletion code
The code around obsolete file deletion is very convoluted and there is one known race (described in #2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes #2630.
- Loading branch information
1 parent
6746f41
commit 7ef9fbe
Showing
17 changed files
with
384 additions
and
550 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
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
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
Oops, something went wrong.