Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore NotFound errors when deleting expired data. #42

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

eatnumber1
Copy link
Contributor

When starting bkt in parallel, the multiple bkts race to clean up expired data. This opens the possibility that deletions will fail because the file has already been deleted... but that's okay, we wanted to do that anyway. So this change ignores NotFound errors on the deletion.

Currently, the result of this race is errors as follows:

bkt: Cache lookup failed: Failed to remove expired data: No such file or directory (os error 2)

Fixes #38

When starting bkt in parallel, the multiple bkts race to clean up
expired data. This opens the possibility that deletions will fail
because the file has already been deleted... but that's okay, we wanted
to do that anyway. So this change ignores NotFound errors on the
deletion.

Currently, the result of this race is errors as follows:

```
bkt: Cache lookup failed: Failed to remove expired data: No such file or directory (os error 2)
```

Fixes dimo414#38
@dimo414 dimo414 merged commit c611f84 into dimo414:master Jul 29, 2023
@dimo414
Copy link
Owner

dimo414 commented Jul 29, 2023

Thanks @eatnumber1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible Race When Starting Many Parallel Bkt Instances
2 participants