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

backupccl: add RestoreData processor #51562

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Conversation

pbardea
Copy link
Contributor

@pbardea pbardea commented Jul 17, 2020

This commit adds a processor which actually performs the ImportRequest.
It has an input which accepts rows with 2 columns that should be sent
from SplitAndScatter processors. Each row represents one span that the
processor should ingest. The intention is that the spans direcected to a
processor on a given node have their leaseholder colocated on the same
node (this work is done in the SplitAndScatter processor). All that
remains is to send a request to ingest the data and stream back its
progress to the coordinator upon completion.

Part of #40239.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pbardea pbardea force-pushed the restore-data branch 3 times, most recently from 6644843 to 4767fe6 Compare July 21, 2020 14:38
@pbardea pbardea requested a review from dt July 21, 2020 14:38
@pbardea pbardea marked this pull request as ready for review July 21, 2020 14:38
@pbardea pbardea requested a review from a team July 21, 2020 14:38
@pbardea
Copy link
Contributor Author

pbardea commented Jul 27, 2020

Friendly ping.

if len(row) != 2 {
return errors.New("expected input rows to have exactly 2 columns")
}
alloc := &sqlbase.DatumAlloc{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could pull this out of the loop so it gets reused as intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -161,6 +161,17 @@ message BackupDataSpec {
message RestoreSpanEntry {
optional roachpb.Span span = 1 [(gogoproto.nullable) = false];
repeated roachpb.ImportRequest.File files = 2 [(gogoproto.nullable) = false];
optional int64 progressIdx = 3 [(gogoproto.nullable) = false];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what sets this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coordinator will set this in restore_job - it's currently not set right now, but will be in the planning PR.

This commit adds a processor which actually performs the ImportRequest.
It has an input which accepts rows with 2 columns that should be sent
from SplitAndScatter processors. Each row represents one span that the
processor should ingest. The intention is that the spans direcected to a
processor on a given node have their leaseholder colocated on the same
node (this work is done in the SplitAndScatter processor). All that
remains is to send a request to ingest the data and stream back its
progress to the coordinator upon completion.

Release note: None
@pbardea
Copy link
Contributor Author

pbardea commented Jul 27, 2020

TFTR!
bors r=dt

@craig
Copy link
Contributor

craig bot commented Jul 27, 2020

Build succeeded:

@craig craig bot merged commit 2c6d0d2 into cockroachdb:master Jul 27, 2020
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 this pull request may close these issues.

3 participants