#1527·sled

Correct handling of corrupted snapshot files

Author: dabelknapCreated Jul 14, 2025Updated Oct 3, 2025

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.