Skip to content

Commit d7ce141

Browse files
craig[bot]msbutler
andcommitted
Merge #150110
150110: crosscluster/physical: fix status after init scan complete r=dt a=msbutler The patch ensures PCR changes the job status message and replication status to replicating once the initial scan completes. Fixes #148150 Release note: none Co-authored-by: Michael Butler <[email protected]>
2 parents e8afcff + 172d8c8 commit d7ce141

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/crosscluster/physical/stream_ingestion_frontier_processor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ func (sf *streamIngestionFrontier) maybeUpdateProgress() error {
341341

342342
if replicatedTime.IsSet() && streamProgress.ReplicationStatus == jobspb.InitialScan {
343343
streamProgress.ReplicationStatus = jobspb.Replicating
344+
md.Progress.StatusMessage = streamProgress.ReplicationStatus.String()
344345
}
345346

346347
// Keep the recorded replicatedTime empty until some advancement has been made

pkg/crosscluster/replicationtestutils/testutils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ func WaitUntilStartTimeReached(t *testing.T, db *sqlutils.SQLRunner, ingestionJo
601601

602602
return requireReplicatedTime(startTime, jobutils.GetJobProgress(t, db, ingestionJobID))
603603
}, timeout)
604+
605+
var runningStatus string
606+
db.QueryRow(t, "SELECT running_status FROM [SHOW JOB $1]", ingestionJobID).Scan(&runningStatus)
607+
require.Equal(t, "replicating", runningStatus, "job should be in replicating state after reaching start time")
604608
}
605609

606610
func WaitUntilReplicatedTime(

0 commit comments

Comments
 (0)