From 490b4b100d15e62a61f0ee8ff44c376df3fec899 Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Mon, 22 Jul 2024 11:49:41 -0400 Subject: [PATCH] crosscluster/logical: rename TargetClusterConnStr Epic: none Release note: None --- .../logical/create_logical_replication_stmt.go | 2 +- pkg/ccl/crosscluster/logical/logical_replication_job.go | 4 ++-- pkg/jobs/jobspb/jobs.proto | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/ccl/crosscluster/logical/create_logical_replication_stmt.go b/pkg/ccl/crosscluster/logical/create_logical_replication_stmt.go index e1c7b6478d4f..745950717ccf 100644 --- a/pkg/ccl/crosscluster/logical/create_logical_replication_stmt.go +++ b/pkg/ccl/crosscluster/logical/create_logical_replication_stmt.go @@ -216,7 +216,7 @@ func createLogicalReplicationStreamPlanHook( StreamID: uint64(spec.StreamID), SourceClusterID: spec.SourceClusterID, ReplicationStartTime: replicationStartTime, - TargetClusterConnStr: string(streamAddress), + SourceClusterConnStr: string(streamAddress), ReplicationPairs: repPairs, TableNames: srcTableNames, DefaultConflictResolution: defaultConflictResolution, diff --git a/pkg/ccl/crosscluster/logical/logical_replication_job.go b/pkg/ccl/crosscluster/logical/logical_replication_job.go index 9cd99585cb13..89edb6b3b4f1 100644 --- a/pkg/ccl/crosscluster/logical/logical_replication_job.go +++ b/pkg/ccl/crosscluster/logical/logical_replication_job.go @@ -122,7 +122,7 @@ func (r *logicalReplicationResumer) ingest( ) client, err := streamclient.NewStreamClient(ctx, - crosscluster.StreamAddress(payload.TargetClusterConnStr), + crosscluster.StreamAddress(payload.SourceClusterConnStr), jobExecCtx.ExecCfg().InternalDB, streamclient.WithStreamID(streampb.StreamID(streamID)), streamclient.WithLogical(), @@ -391,7 +391,7 @@ func (p *logicalReplicationPlanner) generatePlanWithFrontier( } specs, err := constructLogicalReplicationWriterSpecs(ctx, - crosscluster.StreamAddress(p.payload.TargetClusterConnStr), + crosscluster.StreamAddress(p.payload.SourceClusterConnStr), plan.Topology, destNodeLocalities, p.payload.ReplicationStartTime, diff --git a/pkg/jobs/jobspb/jobs.proto b/pkg/jobs/jobspb/jobs.proto index a4df0d070a69..6abeb9afa5d5 100644 --- a/pkg/jobs/jobspb/jobs.proto +++ b/pkg/jobs/jobspb/jobs.proto @@ -208,10 +208,9 @@ message HistoryRetentionProgress { } message LogicalReplicationDetails { - // ID of the protected timestamp record this job is managing. - string target_cluster_conn_str = 1 [ - (gogoproto.customname) = "TargetClusterConnStr" - ]; + // SourceClusterConnStr is the user-provided address of the source + // cluster. + string source_cluster_conn_str = 1; // TableNames is the original list of source table names given by the user. repeated string table_names = 2;