CRC check should be performed before unpacking data
Closed this issue · 3 comments
dreverri commented
Currently Bitcask performs a CRC check after unpacking data. This may lead to a badmatch
error when unpacking the data if the data is corrupt. Checking the CRC before unpacking the data would avoid this badmatch
error.
Relevant section of code:
https://github.com/basho/bitcask/blob/d8958d98d6619a1a8b9e71a7a7b19a7d9fb38ef0/src/bitcask_fileops.erl#L171-181
slfritchie commented
Dan, this issue looks closable, yes?
dreverri commented
yes; this is fixed on master