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
In the following circumstances:
add, andWe erase the old wrapped tail, prior to updating the database header.
https://github.com/linkedin/cassette/blob/master/Cassette/CASQueueFile.m#L453
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