Skip to content

Commit

Permalink
undo the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjinx committed Jan 24, 2024
1 parent 234d185 commit e714aee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/vt/discovery/tablet_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package discovery
import (
"context"
"fmt"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -272,7 +273,7 @@ func (thc *tabletHealthCheck) checkConn(hc *HealthCheckImpl) {
}()

// Read stream health responses.
thc.stream(streamCtx, func(shr *query.StreamHealthResponse) error {
err := thc.stream(streamCtx, func(shr *query.StreamHealthResponse) error {
// We received a message. Reset the back-off.
retryDelay = hc.retryDelay
// Don't block on send to avoid deadlocks.
Expand All @@ -286,7 +287,7 @@ func (thc *tabletHealthCheck) checkConn(hc *HealthCheckImpl) {
// streamCancel to make sure the watcher goroutine terminates.
streamCancel()

/*if err != nil {
if err != nil {
hcErrorCounters.Add([]string{thc.Target.Keyspace, thc.Target.Shard, topoproto.TabletTypeLString(thc.Target.TabletType)}, 1)
// This means that another tablet has taken over the host:port that we were connected to.
// So let's remove the tablet's data from the healthcheck, and if it is still a part of the
Expand All @@ -301,7 +302,7 @@ func (thc *tabletHealthCheck) checkConn(hc *HealthCheckImpl) {
// trivialUpdate = false because this is an error
// up = false because we did not get a healthy response
hc.updateHealth(thc.SimpleCopy(), thc.Target, false, false)
}*/
}

// If there was a timeout send an error. We do this after stream has returned.
// This will ensure that this update prevails over any previous message that
Expand Down

0 comments on commit e714aee

Please sign in to comment.