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

Durability Issue #23

Open
stefanpenner opened this issue Jul 2, 2020 · 0 comments
Open

Durability Issue #23

stefanpenner opened this issue Jul 2, 2020 · 0 comments

Comments

@stefanpenner
Copy link
Member

stefanpenner commented Jul 2, 2020

In the following circumstances:

  • when expanding the database file during an add, and
  • when an existing entry is wrapped around the end of the database file (since this is a ring buffer)

We erase the old wrapped tail, prior to updating the database header.
https://github.com/linkedin/cassette/blob/master/Cassette/CASQueueFile.m#L453

        [self ringEraseAtPosition:QueueFileHeaderLength length:count];

Although the window is small, if a crash occurs during this period it will result in corrupted data.


This solution should be simple, removing the line in question is most likely all we need

@stefanpenner stefanpenner changed the title Potential Durability Issue Durability Issue Jul 2, 2020
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

No branches or pull requests

1 participant