Skip to content

Commit

Permalink
Revert "Skip for-loop alloc in go/vt/discovery/healthcheck.go" (#15328
Browse files Browse the repository at this point in the history
)

Signed-off-by: Dirkjan Bussink <[email protected]>
  • Loading branch information
dbussink authored Feb 22, 2024
1 parent c536bb7 commit ba3531f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/discovery/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ func FilterTargetsByKeyspaces(keyspaces []string, targets []*query.Target) []*qu
func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.Target, requireServing bool) error {
targets = FilterTargetsByKeyspaces(KeyspacesToWatch, targets)

var tabletHealths []*TabletHealth
for {
// We nil targets as we find them.
allPresent := true
Expand All @@ -783,6 +782,7 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.
continue
}

var tabletHealths []*TabletHealth
if requireServing {
tabletHealths = hc.GetHealthyTabletStats(target)
} else {
Expand Down

0 comments on commit ba3531f

Please sign in to comment.