Open GoogleCodeExporter opened 9 years ago
Thanks for the detailed bug report. I looked at the database you enclosed. It
looks like one of the files in it (000063.sst) is corrupted. It is full of
zeroes in the offset range [2012770 .. 2015231].
Corruption really shouldn't trigger crashes inside leveldb, and I will think of
how to fix leveldb so it skips over such corruptions with proper error
reporting instead of crashing.
Do you have critical data in this database? If so, you can recover most of it
by rewriting the corrupted file by using the Table and TableBuilder APIs to
generate a new table file:
open the file using the Table API
create TableBuilder pointing to a new file
create iterator over Table
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
add iter->key()/iter->value() to builder
}
close the builder
replace corrupted file with new file
Thanks.
Original comment by san...@google.com
on 25 Jun 2012 at 8:24
Ah, thanks for the help!
Original comment by sam.j...@inktank.com
on 25 Jun 2012 at 8:26
Any news or new findings on this issue? I've had problems together with ceph
and btrfs but it's obviously not because of ceph, rather it seems to have
something to do with btrfs with compression enabled and leveldb on it. Here's
the bug reported for the ceph distributed storage system:
http://tracker.ceph.com/issues/2563
Thanks!
Original comment by j...@insane.se
on 9 Feb 2013 at 5:16
If leveldb is using sparse files, then this may have been the problem
https://git.kernel.org/?p=linux/kernel/git/josef/btrfs-next.git;a=commit;h=d468a
bec6b9fd7132d012d33573ecb8056c7c43f
Original comment by j.michae...@gmail.com
on 9 Feb 2013 at 6:23
Just as one more data point, we hit this problem too on an ext3 file system
that had a disk with a few bad sectors (which has since been replaced). Using
Sanjay's Table/TableBuilder pseudocode allows working around the corrupted
*.sst with minimal data loss (which is great). Still, a fix in leveldb proper
would be great appreciated. :)
Original comment by ahochh...@samegoal.com
on 19 Feb 2013 at 6:46
Original issue reported on code.google.com by
rexludo...@gmail.com
on 14 Jun 2012 at 9:51Attachments: