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

fix file clean up for BigQueue #2570

Merged
merged 2 commits into from
Apr 23, 2021
Merged

fix file clean up for BigQueue #2570

merged 2 commits into from
Apr 23, 2021

Conversation

cgardens
Copy link
Contributor

What

While reading through our usage of BigQueue, I realized that it might not clean up properly in error cases. gc only deletes "used" files. So in an error case where some of the underlying files haven't been consumed yet from the queue, then they would not be deleted.

How

Replace it by blowing away the entire persistence layer. If we ever want to use BigQueue to persist data across processes, then we will need to rethink it, but the way we are wrapping it now this should be safe.

@jrhizor
Copy link
Contributor

jrhizor commented Mar 23, 2021

How'd you run across this?

@cgardens
Copy link
Contributor Author

i was reading about using bigqueue for notifications and while i was reading about it i noticed the contract it had around cleaning up and that the way we were doing it was insufficient. pretty random. 🤷‍♀️

@cgardens cgardens force-pushed the cgardens/fix_bigqueue_close branch from 36483ff to 88a9728 Compare April 23, 2021 16:38
@cgardens cgardens merged commit 159a27f into master Apr 23, 2021
@cgardens cgardens deleted the cgardens/fix_bigqueue_close branch April 23, 2021 16:39
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.

2 participants