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

discovery: Remove unused code #15332

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
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
22 changes: 0 additions & 22 deletions go/vt/discovery/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,6 @@ import (
// This file contains helper filter methods to process the unfiltered list of
// tablets returned by HealthCheckImpl.GetTabletHealth*.

func TabletHealthReferenceListToValue(thl []*TabletHealth) []TabletHealth {
newTh := []TabletHealth{}
for _, th := range thl {
newTh = append(newTh, *th)
}
return newTh
}

// RemoveUnhealthyTablets filters all unhealthy tablets out.
// NOTE: Non-serving tablets are considered healthy.
func RemoveUnhealthyTablets(tabletStatsList []TabletHealth) []TabletHealth {
result := make([]TabletHealth, 0, len(tabletStatsList))
for _, ts := range tabletStatsList {
// Note we do not check the 'Serving' flag here.
if ts.LastError != nil || ts.Stats != nil && (ts.Stats.HealthError != "" || IsReplicationLagHigh(&ts)) {
continue
}
result = append(result, ts)
}
return result
}

func ParseTabletTypesAndOrder(tabletTypesStr string) ([]topodatapb.TabletType, bool, error) {
inOrder := false
if strings.HasPrefix(tabletTypesStr, InOrderHint) {
Expand Down
134 changes: 0 additions & 134 deletions go/vt/discovery/utils_test.go

This file was deleted.

Loading