Skip to content

Durability Issue #23

@stefanpenner

Description

@stefanpenner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions