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: introduce ClusterUri and ConfigUri #138689

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jeffswenson
Copy link
Collaborator

This change introduces two types to replace StreamAddress. ConfigUri is
the URI supplied by the user to the job. ConfigUri may be an external
connection. ClusterUri is the Uri used to dial nodes in the destination
cluster.

This split was made to support the LDR/PCR over load balancer changes.
The routing mode is defined by a URI parameter and the external
connection needs to be resolved before the routing mode can be
determined. The types allow us to add routing mode as ClusterUri method.

There is one non-cosmetic change in this PR. The PCR job now tries to
use the config URI as the first URI to connect to even if it
checkpointed URIs for individual nodes (see stream_ingestion_job.go).
This matches the behavior of LDR and is needed to properly handle
updates to external URIs.

Release Note: none
Epic: CRDB-40896

This simplifies the streamclient interface by removing the Dial method
and moving the validation in Dial to interface construction time.

Release note: none
Epic: CRDB-40896
@jeffswenson jeffswenson requested review from a team as code owners January 8, 2025 22:17
@jeffswenson jeffswenson requested review from dt and removed request for a team January 8, 2025 22:17
Copy link

blathers-crl bot commented Jan 8, 2025

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

It looks like your PR touches SQL parser code but doesn't add or edit parser tests. Please make sure you add or edit parser tests if you edit the parser.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jeffswenson
Copy link
Collaborator Author

This PR depends on #138092

This change introduces two types to replace StreamAddress. ConfigUri is
the URI supplied by the user to the job. ConfigUri may be an external
connection. ClusterUri is the Uri used to dial nodes in the destination
cluster.

This split was made to support the LDR/PCR over load balancer changes.
The routing mode is defined by a URI parameter and the external
connection needs to be resolved before the routing mode can be
determined. The types allow us to add routing mode as ClusterUri method.

There is one non-cosmetic change in this PR. The PCR job now tries to
use the config URI as the first URI to connect to even if it
checkpointed URIs for individual nodes (see stream_ingestion_job.go).
This matches the behavior of LDR and is needed to properly handle
updates to external URIs.

Release Note: none
Epic: CRDB-40896
@jeffswenson jeffswenson force-pushed the jeffswenson-crosscluster-refactoring branch from 87f4a66 to d939b57 Compare January 9, 2025 14:44
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