Closed dreverri closed 12 years ago
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.
badmatch
Relevant section of code: https://github.com/basho/bitcask/blob/d8958d98d6619a1a8b9e71a7a7b19a7d9fb38ef0/src/bitcask_fileops.erl#L171-181
I've just created pull request with the fix: https://github.com/basho/bitcask/pull/32
Dan, this issue looks closable, yes?
yes; this is fixed on master
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 thisbadmatch
error.Relevant section of code: https://github.com/basho/bitcask/blob/d8958d98d6619a1a8b9e71a7a7b19a7d9fb38ef0/src/bitcask_fileops.erl#L171-181