-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
backup: "invalid header size" error during restore #40670
Comments
@pbardea @solongordon is this a release blocker? |
Yes, @lucy-zhang added it to the list this morning. @pbardea has bisected this issue to a commit which bumped the Pebble version. So far the reg cluster backups are the only known example of the error. |
cc @petermattis |
It also seems that after the import succeeds without that line, we are able to read the data from the restore. Unsure if that's expected considering that I think this means that the topLevleIndex is empty (I assume it may just scan all the data blocks in the SST in this case?) |
Huh, commenting out the line you indicated seems really problematic as we would create invalid sstables (the top-level index would be broken). Can you instead try setting |
It looks like that also resolves the issue. (The RESTORE is not yet complete, but usually errors out quite quickly -- will update when the RESTORE completes). In this case does it look like this is an Pebble issue? (I haven't found anything above this in the stack that looks amiss otherwise.) If so, I can file an issue and set the index block size as described above as a temporary work-around until the two level index issue is resolved? (For posterity: Yesterday I also noticed that the issue disappeared when I toggled https://github.com/cockroachdb/pebble/blob/master/sstable/writer.go#L364 to be |
Yes. Two-level indexes were only recently added to pebble. We don't actually enable them for RocksDB. Totally fine to disable them. It will be useful for the issue you file to have reproduction instructions. Please include the SHA of cockroachdb you were running at.
Right. That's the brute force way to disable two-level indexes. |
Setting the IndexBlockSize to MaxInt disables two level indexes. Using two level indexes cause issues restoring some registration cluster backups. This change servers as a work-around until cockroachdb/pebble#285 is resolved. Fixes cockroachdb#40670. Release justification: RESTOREs on registration cluster backups started failing after enabling two level indexes in Pebble. This was a release blocking bug and this fix allows these backups to be restored again until more investigation is done in the two level index issue. Release note: None
If I understand correctly, Pebble is being used to write the sstables which are then ingested into RocksDB, right? It is possible RocksDB has a bug in handling two-level indexes. |
Correcting my misunderstanding above: Pebble is being used to write the sstables and then |
I encountered a concerning error while trying to restore a registration cluster backup to a roachprod cluster:
I tried the same restore out on a few different cockroach versions and observed the error on
v19.2.0-beta.20190826
and later but not onv19.2.0-alpha.20190805
and earlier.Repro steps:
Then run the following statements, filling in sensitive info as necessary:
The error should appear within 30 seconds.
The text was updated successfully, but these errors were encountered: