-
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
streamingccl,sql: add sql syntax and ingestion planning logic #59112
Conversation
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.
LGTM -- I want to take a look after rebasing on top of #59139 (sorry!)
} | ||
|
||
// We only support a TENANT target, so error out if that is nil. | ||
if ingestionStmt.Targets.Tenant == (roachpb.TenantID{}) { |
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.
Should we also check that the other targets are nil
and error out if they're not?
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.
done.
StreamAddress: streamingccl.StreamAddress(from[0]), | ||
Span: roachpb.Span{Key: prefix, EndKey: prefix.Next()}, | ||
// TODO: Figure out what the initial ts should be. | ||
StartTime: hlc.Timestamp{}, |
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.
This will end up being the endtime
of the backup that we're restoring when that is hooked up. I think that keeping it at empty should be good for now.
09104ae
to
70f88cc
Compare
This change adds basic SQL syntax to start the ingestion job which will read from the replication stream it is pointed to, and ingest the KVs into the destination tenant's keyspace. Release note (sql change): add SQL syntax for `RESTORE tenant x FROM REPLICATION STREAM FROM 'replication_stream'`. This allows the user to start an ingestion job to ingest KVs from the replication stream into the destination tenant's keyspace.
This change adds the boiler plate plan hook that configures and starts up the ingestion job. Release note: None
70f88cc
to
320a77b
Compare
TFTR! bors r=pbardea |
Build succeeded: |
commit 1 - add ingestion job SQL syntax
commit 2 - add ingestion job plan hook and hookup planning, job, and processors.