diff --git a/go/vt/discovery/healthcheck.go b/go/vt/discovery/healthcheck.go index 1a669f60faa..fcdec0b1af6 100644 --- a/go/vt/discovery/healthcheck.go +++ b/go/vt/discovery/healthcheck.go @@ -760,6 +760,8 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query. // Unblock after the sleep or when the context has expired. timer := time.NewTimer(waitAvailableTabletInterval) + waitLogPeriod := 5 * time.Second + waitLogSoFar := 0 * time.Second select { case <-ctx.Done(): timer.Stop() @@ -770,6 +772,17 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query. } return ctx.Err() case <-timer.C: + waitLogSoFar += waitAvailableTabletInterval + if waitLogSoFar >= waitLogPeriod { + waitLogSoFar = 0 + var nonNilTargets = []query.Target{} + for _, target := range targets { + if target != nil { + nonNilTargets = append(nonNilTargets, *target) + } + } + log.Infof("Still waiting for targets %+v", nonNilTargets) + } } } }