From 17e06ec8eb0478b7d7fe7c2e0f9d098bff80c580 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 21 Jan 2025 14:16:43 -0600 Subject: [PATCH] wip - remove retry logic Signed-off-by: Florent Poinsard --- go/cmd/vtbackup/cli/vtbackup.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/go/cmd/vtbackup/cli/vtbackup.go b/go/cmd/vtbackup/cli/vtbackup.go index 94cf0d7ec50..e3c0b712dfe 100644 --- a/go/cmd/vtbackup/cli/vtbackup.go +++ b/go/cmd/vtbackup/cli/vtbackup.go @@ -537,12 +537,12 @@ func takeBackup(ctx, backgroundCtx context.Context, topoServer *topo.Server, bac waitStartTime = time.Now() - continuousErrorCount int + // continuousErrorCount int ) for { - if continuousErrorCount == maximumErrorCountWhenWaitingForReplicationStatus { - return fmt.Errorf("timeout waiting for replication status after %d errors", maximumErrorCountWhenWaitingForReplicationStatus) - } + // if continuousErrorCount == maximumErrorCountWhenWaitingForReplicationStatus { + // return fmt.Errorf("timeout waiting for replication status after %d errors", maximumErrorCountWhenWaitingForReplicationStatus) + // } select { case <-ctx.Done(): @@ -554,7 +554,7 @@ func takeBackup(ctx, backgroundCtx context.Context, topoServer *topo.Server, bac status, statusErr = mysqld.ReplicationStatus(ctx) if statusErr != nil { log.Warningf("Error getting replication status: %v", statusErr) - continuousErrorCount++ + // continuousErrorCount++ continue } if status.Position.AtLeast(primaryPos) { @@ -577,11 +577,11 @@ func takeBackup(ctx, backgroundCtx context.Context, topoServer *topo.Server, bac if err := startReplication(ctx, mysqld, topoServer); err != nil { log.Warningf("Failed to restart replication: %v", err) } - continuousErrorCount++ + // continuousErrorCount++ } else { // Since replication is working if we got here, let's reset the error count to zero. // This allows us to avoid failing if we only have transient errors from time to time. - continuousErrorCount = 0 + // continuousErrorCount = 0 phaseStatus.Set([]string{phaseNameCatchupReplication, phaseStatusCatchupReplicationStopped}, 0) } }