-
Notifications
You must be signed in to change notification settings - Fork 472
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
Corruption: missing start of fragmented record(2) when opening Pebble generated db in Rocksdb #566
Comments
Thanks for the report. I'll take a look. |
@lni How do you reproduce an error here? I've tried using |
I'm using RocksDB 6.6.4 for the above commands. |
I just realized that the error is reported when RocksDB's wal_recovery_mode is set to kTolerateCorruptedTailRecords. It can be reproduced using the cpp code below. Any chance the generated wal has format compatibility issue?
|
Setting the wal_recovery_mode to kAbsoluteConsistency will produce the same error. Also probably worth to mention that the attached DB was generated without any crash. |
Thanks for the code. I've got this reproduced. Looking further. |
I believe what we're seeing here is an incompatibility between WAL recycling and certain RocksDB WAL recovery modes. See facebook/rocksdb#6351, though note I think that PR is slightly flawed as I think @lni Pebble currently doesn't provide an option to disable WAL recycling. I'm slightly disinclined to add one as I have an aversion to the proliferation of options (Pebble already has too many). My preference is to document the compatibility requirement here. It would be nice to verify that this is, in fact, the problem. In |
Hi @petermattis, I haven't changed my mind about that, it still feels like |
That change came from a 2PC incompatibility with WAL recycling + |
@petermattis Thanks for looking into this. I can confirm that the above reported corruption is gone once I changed logRecycler.limit to 1. |
sorry for the typo above, logRecycler.limit was set to 0, not 1. |
Finally got around to rethinking the fix. After experimenting a bit, it turns out there probably was a bug in RocksDB's implementation of |
Hi @petermattis
I got this error when trying to open a Pebble (v0.0.0-20200309175429-4cd6b7883221) generated DB in RocksDB 6.4/6.6. Zipped DB is attached below. Could you please help to have a quick look? Thanks!
data.zip
The text was updated successfully, but these errors were encountered: