-
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
backupccl: add TestOnlineRestoreS3 and TestOnlineRestoreBasic tests #114279
backupccl: add TestOnlineRestoreS3 and TestOnlineRestoreBasic tests #114279
Conversation
Previously, if sendAddRemoteSSTs would return an error, the online restore would hang because the coordinator did not close the tracingAggregator channel. This patch fixes this. Epic: none Release note: none
This comment was marked as outdated.
This comment was marked as outdated.
d4c36f8
to
8661371
Compare
…pply This hack allows online restore to succeed. In the long run, I guess we'll need to know if the external sst has point or range keys in the provided span. Epic: none Release note: none
aae055b
to
ddf6c07
Compare
This patch adds TestOnlineRestoreS3 to our cloud unit test suite. To run locally, run: ``` ./dev test pkg/ccl/backupccl -f TestOnlineRestoreS3 -- --test_env=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --test_env=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --test_env=AWS_S3_BUCKET=cockroachdb-backup-cloud-nightly --test_env=COCKROACH_UNSAFE_RESTORE=true ``` This patch also adds TestOnlineRestoreBasic which runs online restore through nodelocal. To run locally, run: ``` ./dev test pkg/ccl/backupccl -f TestOnlineRestoreBasic -- --test_env=COCKROACH_UNSAFE_RESTORE=true ``` Both tests will be skipped in the nightlies until we pass COCKROACH_UNSAFE_RESTORE to their setup. Epic: none Release note: none
This patch removes the COCKROACH_UNSAFE_RESTORE env var which gates online restore. The gate no longer seems necesssary as all development will occur on master for the next few months. In addition, the env var makes it slightly annoying to test online restore. Epic: None Release note: None
06ac99b
to
49e8cd4
Compare
@@ -655,6 +655,10 @@ func addSSTablePreApply( | |||
Size: sst.BackingFileSize, | |||
SmallestUserKey: start.Encode(), | |||
LargestUserKey: end.Encode(), | |||
|
|||
// TODO(msbutler): I guess we need to figure out if the backing external |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itsbilal Given the preso this morning, I guess I should reword this comment to: "we set this true even if the virtual SST's span covers no point keys in the remote sst, to avoid a pebble level panic during ingestion. At download time, if the backing file has no actual keys in the span, the virtual sst will be compacted away and no keys will download."
TFTR! bors r=dt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storage side LGTM
|
||
// TODO(msbutler): I guess we need to figure out if the backing external | ||
// file has point or range keys in the target span. | ||
HasPointKey: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to have range keys in backup SSTs at the moment right? So this might be sufficient and good enough for us.
@@ -802,6 +802,7 @@ func (cfg *Config) CreateEngines(ctx context.Context) (Engines, error) { | |||
} | |||
addCfgOpt(storage.MaxSize(sizeInBytes)) | |||
addCfgOpt(storage.CacheSize(cfg.CacheSize)) | |||
addCfgOpt(storage.RemoteStorageFactory(cfg.ExternalStorageAccessor)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this is test-only code seeing as it's under InMem
, while for regular engines we already pass this cfg down below.
Build succeeded: |
This patch adds TestOnlineRestoreS3 to our cloud unit test suite. To run locally, run:
This patch also adds TestOnlineRestoreBasic which runs online restore through
nodelocal. To run locally, run:
Both tests will be skipped in the nightlies until we pass
COCKROACH_UNSAFE_RESTORE to their setup.
Epic: none
Release note: none