Skip to content

Commit

Permalink
Retry waiting for tablets during vtgate initialization if they timeout.
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
  • Loading branch information
ejortegau committed Jan 24, 2025
1 parent 65c00a8 commit abb53cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/vtgate/vtgate.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,12 @@ func Init(
gw.RegisterStats()

// Retry loop for potential time-outs waiting for all tablets.
OuterLoop:
for {
err := gw.WaitForTablets(ctx, tabletTypesToWait)
switch {
case err == nil:
break OuterLoop
case errors.Is(err, context.DeadlineExceeded):
log.Warning("TabletGateway timed out waiting for tablets to become available - retrying.")

Expand Down

0 comments on commit abb53cb

Please sign in to comment.