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

sstable: errors while using writer with two level index #285

Closed
pbardea opened this issue Sep 18, 2019 · 1 comment · Fixed by #289
Closed

sstable: errors while using writer with two level index #285

pbardea opened this issue Sep 18, 2019 · 1 comment · Fixed by #289
Assignees

Comments

@pbardea
Copy link
Contributor

pbardea commented Sep 18, 2019

Doing a RESTORE on a registration backup cluster was causing an error (see: cockroachdb/cockroach#40670). Disabling two level indexes in Pebble. The first commit that introduced this issue was a Pebble version change: cockroachdb/cockroach@1c1c8ee (which, among other changes, introduced the two level index writer).

This can be reproduced on current CockroachDB current master (8e15411a18211652792baa92369c6cd02deff15c).

Reproduction steps:

  1. Checkout commit 8e15411a18211652792baa92369c6cd02deff15c of CockroachDB.
  2. Set up a roachprod cluster with the appropriate binary (note that $USER should be your Cockroach email username):
CLUSTER=$USER-secure
build/builder.sh mkrelease amd64-linux-gnu
roachprod create $CLUSTER -n 3 --clouds=aws --aws-machine-type-ssd=c5d.4xlarge
roachprod put $CLUSTER cockroach-linux-2.6.32-gnu-amd64 cockroach
roachprod start $CLUSTER:1-3 --secure
roachprod sql $CLUSTER:1 --secure
  1. Restore the registration cluster backup in the SQL shell. (Note that the date may need to be updated to something more recent if this backup is eventually cleared.)
SET CLUSTER SETTING cluster.organization = '<redacted>';
SET CLUSTER SETTING enterprise.license = '<redacted>';
CREATE DATABASE registration;
RESTORE TABLE registration.* FROM 's3://cockroach-reg-backups/2019-09-01?AWS_ACCESS_KEY_ID=<redacted>&AWS_SECRET_ACCESS_KEY=<redacted>';
pbardea added a commit to pbardea/cockroach that referenced this issue Sep 18, 2019
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
pbardea added a commit to pbardea/cockroach that referenced this issue Sep 18, 2019
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.

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
craig bot pushed a commit to cockroachdb/cockroach that referenced this issue Sep 19, 2019
40888: bulk: disable two level index in Pebble r=pbardea a=pbardea

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 #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

Co-authored-by: Paul Bardea <[email protected]>
@petermattis
Copy link
Collaborator

I'm about 90% certain the problem is that we're reading the table using golang/leveldb/table which doesn't support two-level indexes. Pebble should disable the use of two-level indexes if pebble.TableFormatLevelDB is specified. But really we should be using pebble/sstable to read the table as the golang/leveldb/table code isn't maintained.

@petermattis petermattis self-assigned this Sep 19, 2019
petermattis added a commit that referenced this issue Sep 20, 2019
Currently this disables usage of the RocksDB sstable footer and
two-level indexes.

Fixes #285
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

Successfully merging a pull request may close this issue.

2 participants