-
Notifications
You must be signed in to change notification settings - Fork 54
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
Failed write corrupts LIFO queue file #14
Comments
attempt (not finished yet) to fix of error either for LIFO and FIFO |
I’m thinking we could solve this by:
Because of the format change, as well as a potential performance impact of slash conversions, I wonder whether we should change the existing queue class or implement a new one that follows this approach (e.g. If we do modify the existing queue class, I wonder how to handle format versioning. For example, should we detect old-format files and upgrade them on disk initialization? Or should we empty such files and start from scratch? |
@dangra Thoughts? |
Not sure if this makes sense here or as a separate issue, but I ran into a different corruption FIFO issue: When the drive ran out of space, somehow the |
I am having the same issue. It should at least be documented that the |
If a write fails when pushing an item to the LIFO queue, some data may be actually written before an exception is raised. When trying to pop, the end of the file is supposed to have the size of the last item, but it actually contains whatever was in the partially written data from previous failed push() calls.
The error above comes from the value of
size
, which is decoded from the lastSIZE_SIZE
bytes of the file. When that value is larger than the file itself the seek will fail.The text was updated successfully, but these errors were encountered: