Skip to content

Commit 49ac1ad

Browse files
committed
Fix logging to the healthcheck's waiting for targets
Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com>
1 parent a82a8d1 commit 49ac1ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

go/vt/discovery/healthcheck.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ func (hc *HealthCheckImpl) WaitForAllServingTablets(ctx context.Context, targets
732732

733733
// waitForTablets is the internal method that polls for tablets.
734734
func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.Target, requireServing bool) error {
735+
log.Infof("Starting wait for tablets loop...")
736+
waitLogSoFar := 0 * time.Second
737+
waitLogPeriod := 5 * time.Second
738+
735739
for {
736740
// We nil targets as we find them.
737741
allPresent := true
@@ -760,8 +764,6 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.
760764

761765
// Unblock after the sleep or when the context has expired.
762766
timer := time.NewTimer(waitAvailableTabletInterval)
763-
waitLogPeriod := 5 * time.Second
764-
waitLogSoFar := 0 * time.Second
765767
select {
766768
case <-ctx.Done():
767769
timer.Stop()

0 commit comments

Comments
 (0)