fbnzk / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Verify CRC in index block when paranoid_checks=true? #148

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It seems like this is not currently being done. When we open a new table file, 
ReadBlock is passed a default ReadOptions() (in Table::Open, at 
table/table.cc:61). Should it perhaps be changed to a ReadOptions with 
verify_checksums=true when paranoid_checks=true in the 'options' variable 
passed in to this function?

Without this, it's possible a corrupted index block would go unnoticed, which 
maybe people setting paranoid_checks would want to know about (since it might 
result in some data being missing during subsequent reads). What do you guys 
think?

What version of the product are you using? On what operating system?
-We're running a slightly modified version of levelDB on linux, but I checked 
that your HEAD still does this, and the line numbers I gave are relative to 
your HEAD as well.

Original issue reported on code.google.com by cha...@gmail.com on 12 Feb 2013 at 2:18