Skip to content

Commit

Permalink
simplify VtctlclientChangeTabletType and use target tablet in executo…
Browse files Browse the repository at this point in the history
…r#showVitessReplicationStatus

Signed-off-by: Austen Lacy <[email protected]>
  • Loading branch information
austenLacy committed Nov 3, 2023
1 parent f4920fe commit d7a4665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions go/test/endtoend/cluster/cluster_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d7a4665

Please sign in to comment.