Skip to content

Commit 6c68177

Browse files
authored
discovery: Remove unused code (#15332)
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
1 parent 229bbaa commit 6c68177

File tree

2 files changed

+0
-156
lines changed

2 files changed

+0
-156
lines changed

go/vt/discovery/utils.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,6 @@ import (
2626
// This file contains helper filter methods to process the unfiltered list of
2727
// tablets returned by HealthCheckImpl.GetTabletHealth*.
2828

29-
func TabletHealthReferenceListToValue(thl []*TabletHealth) []TabletHealth {
30-
newTh := []TabletHealth{}
31-
for _, th := range thl {
32-
newTh = append(newTh, *th)
33-
}
34-
return newTh
35-
}
36-
37-
// RemoveUnhealthyTablets filters all unhealthy tablets out.
38-
// NOTE: Non-serving tablets are considered healthy.
39-
func RemoveUnhealthyTablets(tabletStatsList []TabletHealth) []TabletHealth {
40-
result := make([]TabletHealth, 0, len(tabletStatsList))
41-
for _, ts := range tabletStatsList {
42-
// Note we do not check the 'Serving' flag here.
43-
if ts.LastError != nil || ts.Stats != nil && (ts.Stats.HealthError != "" || IsReplicationLagHigh(&ts)) {
44-
continue
45-
}
46-
result = append(result, ts)
47-
}
48-
return result
49-
}
50-
5129
func ParseTabletTypesAndOrder(tabletTypesStr string) ([]topodatapb.TabletType, bool, error) {
5230
inOrder := false
5331
if strings.HasPrefix(tabletTypesStr, InOrderHint) {

go/vt/discovery/utils_test.go

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)