Skip to content

Commit

Permalink
fix dupe tablet read from backend
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Feb 20, 2025
1 parent d7386b7 commit 9a96d47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go/vt/vtorc/inst/instance_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func ReadTopologyInstanceBufferable(tabletAlias string, latency *stopwatch.Named
goto Cleanup
}

fs, err = fullStatus(tabletAlias)
fs, err = fullStatus(tablet)
if err != nil {
goto Cleanup
}
Expand Down
6 changes: 1 addition & 5 deletions go/vt/vtorc/inst/tablet_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ func InitializeTMC() tmclient.TabletManagerClient {
}

// fullStatus gets the full status of the MySQL running in vttablet.
func fullStatus(tabletAlias string) (*replicationdatapb.FullStatus, error) {
tablet, err := ReadTablet(tabletAlias)
if err != nil {
return nil, err
}
func fullStatus(tablet *topodatapb.Tablet) (*replicationdatapb.FullStatus, error) {
tmcCtx, tmcCancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout)
defer tmcCancel()
return tmc.FullStatus(tmcCtx, tablet)
Expand Down

0 comments on commit 9a96d47

Please sign in to comment.