Skip to content

Commit

Permalink
Revert "sql: add replication start time to `SHOW TENANT WITH REPLICAT…
Browse files Browse the repository at this point in the history
…ION STATUS`"

This reverts commit 3833eed.
  • Loading branch information
adityamaru committed Dec 25, 2022
1 parent 4232883 commit 6663cae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
21 changes: 9 additions & 12 deletions pkg/ccl/streamingccl/streamingest/replication_stream_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,18 +907,17 @@ func TestTenantStreamingShowTenant(t *testing.T) {
replicationDetails := details.Details().(jobspb.StreamIngestionDetails)

var (
id int
dest string
status string
source string
sourceUri string
jobId int
maxReplTime time.Time
protectedTime time.Time
replicationStartTime time.Time
id int
dest string
status string
source string
sourceUri string
jobId int
maxReplTime time.Time
protectedTime time.Time
)
row := c.DestSysSQL.QueryRow(t, fmt.Sprintf("SHOW TENANT %s WITH REPLICATION STATUS", args.DestTenantName))
row.Scan(&id, &dest, &status, &source, &sourceUri, &jobId, &maxReplTime, &protectedTime, &replicationStartTime)
row.Scan(&id, &dest, &status, &source, &sourceUri, &jobId, &maxReplTime, &protectedTime)
require.Equal(t, 2, id)
require.Equal(t, "destination", dest)
require.Equal(t, "REPLICATING", status)
Expand All @@ -929,6 +928,4 @@ func TestTenantStreamingShowTenant(t *testing.T) {
require.Less(t, protectedTime, timeutil.Now())
require.GreaterOrEqual(t, maxReplTime, highWatermark.GoTime())
require.GreaterOrEqual(t, protectedTime, replicationDetails.ReplicationStartTime.GoTime())
require.Equal(t, replicationStartTime.UnixMicro(),
timeutil.Unix(0, replicationDetails.ReplicationStartTime.WallTime).UnixMicro())
}
1 change: 0 additions & 1 deletion pkg/sql/catalog/colinfo/result_columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ var TenantColumnsWithReplication = ResultColumns{
// The protected timestamp on the destination cluster, meaning we cannot
// cutover to before this time.
{Name: "retained_time", Typ: types.Timestamp},
{Name: "replication_start_time", Typ: types.Timestamp},
}

// RangesNoLeases is the schema for crdb_internal.ranges_no_leases.
Expand Down
4 changes: 0 additions & 4 deletions pkg/sql/show_tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ func (n *showTenantNode) Values() tree.Datums {
replicationJobId := tree.NewDInt(tree.DInt(n.tenantInfo.TenantReplicationJobID))
replicatedTimestamp := tree.DNull
retainedTimestamp := tree.DNull
replicationStartTimestamp := tree.DNull

if n.replicationInfo != nil {
sourceTenantName = tree.NewDString(string(n.replicationInfo.IngestionDetails.SourceTenantName))
Expand All @@ -213,8 +212,6 @@ func (n *showTenantNode) Values() tree.Datums {
}
// The protected timestamp on the destination cluster.
retainedTimestamp, _ = tree.MakeDTimestamp(timeutil.Unix(0, n.protectedTimestamp.WallTime), time.Nanosecond)
replicationStartTimestamp, _ = tree.MakeDTimestamp(
timeutil.Unix(0, n.replicationInfo.IngestionDetails.ReplicationStartTime.WallTime), time.Nanosecond)
}

return tree.Datums{
Expand All @@ -226,7 +223,6 @@ func (n *showTenantNode) Values() tree.Datums {
replicationJobId,
replicatedTimestamp,
retainedTimestamp,
replicationStartTimestamp,
}
}

Expand Down

0 comments on commit 6663cae

Please sign in to comment.