-
Notifications
You must be signed in to change notification settings - Fork 102
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
Configurable total size limit and delete old data when exceeded #27
Comments
I can see some value in providing a "strategy" for how the queue should behave in the event of inevitable data loss (discard old or new data), but the point of this library is to durably persist data so that it can be subsequently iterated over. Running out of disk space isn't really in the scope of the functionality provided. |
Thanks @mreiferson Yes I understand it's out of the scope of the original design but with the added strategy of discarding old data, it'll enable many more use cases-) If we have the bandwidth to implement this feature, would you consider accepting the PR and maintaining it later on? It will be guarded by a flag and won't break existing use cases. |
Rather than building all this kind of functionality in to the core, I think that coming up with an API for diskqueue such that the application integrating with it could observe conditions like this and act on them however they wanted seems like a better approach. For example, right now the API we expose only allows reading, writing, purging, and very minimal introspection ( |
Depth() is also costly to run; getting a less expensive way to observe queue depth would be great. |
Thanks for the follow-ups! We've implemented a disk size limit in this fork |
Right now new data
Put()
would fail if disk is out of space. It would be great to have an option toThe text was updated successfully, but these errors were encountered: