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

crosscluster/logical: create new tables if specified #137089

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

msbutler
Copy link
Collaborator

@msbutler msbutler commented Dec 10, 2024

This implements the new CREATE LOGICALLY REPLICATES TABLES syntax, which
creates the destination tables during LDR planning. In this commit, the tables
are created online and LDR iniital scan proceeds as it always has. In a future
commit, these tables will be created in an offline state enabling a fast
initial scan via AddSStable ingestion.

Epic: none

Release note: none

@msbutler msbutler self-assigned this Dec 10, 2024
@cockroach-teamcity
Copy link
Member

This change is Reviewable

This implements the new CREATE LOGICALLY REPLICATES TABLES syntax, which
creates the destination tables during LDR planning. In this commit, the tables
are created online and LDR iniital scan proceeds as it always has. In a future
commit, these tables will be created in an offline state enabling a fast
initial scan via AddSStable ingestion.

Epic: none

Release note: none
@msbutler msbutler force-pushed the butler-ldr-fast-scan-rebase branch from dd4d612 to f05cedf Compare December 10, 2024 19:35
@msbutler msbutler changed the title [dnm, ci expirment, rebase] crosscluster/logical: create new tables if specified Dec 10, 2024
@msbutler msbutler marked this pull request as ready for review December 10, 2024 20:15
@msbutler msbutler requested review from a team as code owners December 10, 2024 20:15
@msbutler msbutler requested review from kev-cao and dt and removed request for a team and kev-cao December 10, 2024 20:15
// If the user asked to ignore "ttl-deletes", make sure that at least one of
// the source tables actually has a TTL job which sets the omit bit that
// is used for filtering; if not, they probably forgot that step.
throwNoTTLWithCDCIgnoreError := discard == jobspb.LogicalReplicationDetails_DiscardCDCIgnoredTTLDeletes

// TODO: consider moving repPair construction into doLDRPlan after dest tables are created.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dt before i do this additional refactor, i'm curious what you think of the patch as it stands now.

@msbutler
Copy link
Collaborator Author

TFTR!

bors r=dt

@craig craig bot merged commit 4f464d5 into cockroachdb:master Dec 12, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants