From d7a46654101a8d123f59570a1ade1a1797c2706d Mon Sep 17 00:00:00 2001 From: Austen Lacy Date: Fri, 3 Nov 2023 13:33:12 +0000 Subject: [PATCH] simplify VtctlclientChangeTabletType and use target tablet in executor#showVitessReplicationStatus Signed-off-by: Austen Lacy --- go/test/endtoend/cluster/cluster_process.go | 6 +----- go/vt/vtgate/executor.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/go/test/endtoend/cluster/cluster_process.go b/go/test/endtoend/cluster/cluster_process.go index 1087037a6ac..28a8807cf08 100644 --- a/go/test/endtoend/cluster/cluster_process.go +++ b/go/test/endtoend/cluster/cluster_process.go @@ -987,11 +987,7 @@ func (cluster *LocalProcessCluster) VtctlclientGetTablet(tablet *Vttablet) (*top func (cluster *LocalProcessCluster) VtctlclientChangeTabletType(tablet *Vttablet, tabletType topodatapb.TabletType) error { _, err := cluster.VtctlclientProcess.ExecuteCommandWithOutput("ChangeTabletType", "--", tablet.Alias, tabletType.String()) - if err != nil { - return err - } - - return nil + return err } // Teardown brings down the cluster by invoking teardown for individual processes diff --git a/go/vt/vtgate/executor.go b/go/vt/vtgate/executor.go index 8465b92944c..152533f2c0d 100644 --- a/go/vt/vtgate/executor.go +++ b/go/vt/vtgate/executor.go @@ -908,7 +908,7 @@ func (e *Executor) showVitessReplicationStatus(ctx context.Context, filter *sqlp // Allow people to filter by Keyspace and Shard using a LIKE clause if filter != nil { ksFilterRegex := sqlparser.LikeToRegexp(filter.Like) - keyspaceShardStr := fmt.Sprintf("%s/%s", ts.Tablet.Keyspace, ts.Tablet.Shard) + keyspaceShardStr := fmt.Sprintf("%s/%s", ts.Target.Keyspace, ts.Target.Shard) if !ksFilterRegex.MatchString(keyspaceShardStr) { continue }