Skip to content

Commit

Permalink
discovery: Remove unused code (#15332)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
  • Loading branch information
dbussink authored Feb 23, 2024
1 parent 229bbaa commit 6c68177
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 156 deletions.
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.

0 comments on commit 6c68177

Please sign in to comment.