Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with CRC invalid blocks #298

Closed
martinsumner opened this issue Nov 4, 2019 · 5 comments
Closed

Issue with CRC invalid blocks #298

martinsumner opened this issue Nov 4, 2019 · 5 comments

Comments

@martinsumner
Copy link
Owner

To this end, when we de-serialise a block into a list of KV pairs, we return an empty list if the CRC check fails:

https://github.com/martinsumner/leveled/tree/5bef21d9719a561beeaf735e168bd140d9771e38/src/leveled_sst.erl#L1391-L1399

But when we have an indexed lookup on a block we look at the exact position in the block:

https://github.com/martinsumner/leveled/tree/5bef21d9719a561beeaf735e168bd140d9771e38/src/leveled_sst.erl#L1696-L1697

and this is crashing with the empty list.

Elsewhere in leveled_sst the functions fetchfrom_rawblock/2 and fetchend_rawblock/2 are used to counter this issue.

This issue will cause a database crash on an invalid block - which is not expected.

@martinsumner
Copy link
Owner Author

@uwiger

@martinsumner
Copy link
Owner Author

https://github.com/martinsumner/leveled/tree/mas-i298-corruptedblocks

This is going through the test cycles now

@martinsumner
Copy link
Owner Author

#299

@martinsumner
Copy link
Owner Author

EQC test run passed at 1000 tests. Needed to correct issue in eqc test, where it would not accept pause as a valid response to a PUT style request

@martinsumner
Copy link
Owner Author

#299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant