Skip to content

Commit

Permalink
br: avoid possible infinite loop checking tikv gc and scheduling status
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <dawn_catcher@126.com>
  • Loading branch information
BornChanger committed Aug 14, 2023
1 parent 9232aac commit eaed28e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions br/pkg/task/backup_ebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ func waitAllScheduleStoppedAndNoRegionHole(ctx context.Context, cfg Config, mgr
} else {
log.Warn("failed to wait schedule, will retry later", zap.Error(err2))
}
continue
}

log.Info("all leader regions got, start checking hole", zap.Int("len", len(allRegions)))
} else {
log.Info("all leader regions got, start checking hole", zap.Int("len", len(allRegions)))

Check warning on line 299 in br/pkg/task/backup_ebs.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/task/backup_ebs.go#L298-L299

Added lines #L298 - L299 were not covered by tests

if !isRegionsHasHole(allRegions) {
return nil
if !isRegionsHasHole(allRegions) {
return nil
}
log.Info("Regions has hole, needs sleep and retry")

Check warning on line 304 in br/pkg/task/backup_ebs.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/task/backup_ebs.go#L301-L304

Added lines #L301 - L304 were not covered by tests
}
time.Sleep(backoffer.ExponentialBackoff())
}
Expand Down

0 comments on commit eaed28e

Please sign in to comment.