diff --git a/pkg/ccl/streamingccl/streamingest/stream_ingestion_job.go b/pkg/ccl/streamingccl/streamingest/stream_ingestion_job.go index 40c1829d2882..dd4efeedf120 100644 --- a/pkg/ccl/streamingccl/streamingest/stream_ingestion_job.go +++ b/pkg/ccl/streamingccl/streamingest/stream_ingestion_job.go @@ -279,6 +279,10 @@ func (s *streamIngestionResumer) handleResumeError( func (s *streamIngestionResumer) Resume(ctx context.Context, execCtx interface{}) error { // Protect the destination tenant's keyspan from garbage collection. jobExecCtx := execCtx.(sql.JobExecContext) + + if err := jobExecCtx.ExecCfg().JobRegistry.CheckPausepoint("stream_ingestion.before_protection"); err != nil { + return err + } err := s.protectDestinationTenant(ctx, jobExecCtx) if err != nil { return s.handleResumeError(ctx, jobExecCtx, err) diff --git a/pkg/ccl/streamingccl/streamingest/testdata/show_without_pts b/pkg/ccl/streamingccl/streamingest/testdata/show_without_pts new file mode 100644 index 000000000000..a8ee6c48e9fe --- /dev/null +++ b/pkg/ccl/streamingccl/streamingest/testdata/show_without_pts @@ -0,0 +1,19 @@ +# This test verifies that SHOW TENANT works even if a dest pts hasn't been set. + +create-replication-clusters +---- + +exec-sql as=destination-system +SET CLUSTER SETTING jobs.debug.pausepoints = 'stream_ingestion.before_protection'; +---- + +start-replication-stream +---- + +job as=destination-system wait-for-state=paused +---- + +query-sql as=destination-system +SELECT replicated_time FROM [SHOW VIRTUAL CLUSTER destination WITH REPLICATION STATUS]; +---- +