Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip for-loop alloc in go/vt/discovery/healthcheck.go #15326

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/vt/discovery/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ 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 @@ -782,7 +783,6 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.
continue
}

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