Skip to content

Correct handling of corrupted snapshot files #1527

@dabelknap

Description

@dabelknap

I am seeing the following fatal error when opening an existing sled database (v0.34.7):

[... TRACE sled::context] starting context
[... TRACE sled::pagecache] starting pagecache
[... WARN sled::pagecache] corrupt snapshot file found, crc does not match expected
Error: Sled(Corruption { at: None, bt: () })

The contents of my sled DB directory are:

./blob/
conf
db
snap.XXX
snap.YYY.generating

Deleting the snap.YYY.generating file does allow the database to open without any errors, however I do not know if this breaks some invariant and silently puts the database into an invalid state. Is deleting snapshot files a reasonable thing to do for this error, or is it better to start over with an empty DB?

Note: At this time, I do not have reason to believe that the corruption is the result of a bug in sled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions