Skip to content

Commit

Permalink
br: add restore name to warmup job name
Browse files Browse the repository at this point in the history
Signed-off-by: WangLe1321 <[email protected]>
  • Loading branch information
WangLe1321 committed Aug 8, 2023
1 parent 9eb06d2 commit 884e474
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/backup/restore/restore_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ func (rm *restoreManager) warmUpTiKVVolumesSync(r *v1alpha1.Restore, tc *v1alpha
if len(podPVCs) != volumesCount {
return fmt.Errorf("expected pvc count %d, got pvc count %d, not equal", volumesCount, len(podPVCs))
}
warmUpJobName := fmt.Sprintf("%s-%d-warm-up", stsName, number)
warmUpJobName := fmt.Sprintf("%s-%s-%d-warm-up", r.Name, stsName, number)
_, err := rm.deps.JobLister.Jobs(ns).Get(warmUpJobName)
if err == nil {
klog.Infof("Restore %s/%s warmup job %s/%s exists, pass it", r.Namespace, r.Name, ns, warmUpJobName)
Expand Down Expand Up @@ -1038,7 +1038,7 @@ func (rm *restoreManager) warmUpTiKVVolumesAsync(r *v1alpha1.Restore, tc *v1alph
}
for _, pod := range tikvPods {
ns, podName := pod.Namespace, pod.Name
warmUpJobName := fmt.Sprintf("%s-warm-up", podName)
warmUpJobName := fmt.Sprintf("%s-%s-warm-up", r.Name, podName)
_, err := rm.deps.JobLister.Jobs(ns).Get(warmUpJobName)
if err == nil {
klog.Infof("Restore %s/%s warmup job %s/%s of tikv pod %s/%s exists, pass it", r.Namespace, r.Name, ns, warmUpJobName, ns, podName)
Expand Down

0 comments on commit 884e474

Please sign in to comment.