Skip to content

Commit

Permalink
br: Allow restore retry if failed (#6092)
Browse files Browse the repository at this point in the history
  • Loading branch information
RidRisR authored Feb 21, 2025
1 parent e84b19c commit 610a9f9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,16 @@ bool
<p>TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss</p>
</td>
</tr>
<tr>
<td>
<code>backoffLimit</code></br>
<em>
int32
</em>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
Expand Down Expand Up @@ -15759,6 +15769,16 @@ bool
<p>TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss</p>
</td>
</tr>
<tr>
<td>
<code>backoffLimit</code></br>
<em>
int32
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<h3 id="restorestatus">RestoreStatus</h3>
Expand Down
4 changes: 4 additions & 0 deletions manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22493,6 +22493,10 @@ spec:
storageAccount:
type: string
type: object
backoffLimit:
default: 0
format: int32
type: integer
backupType:
type: string
br:
Expand Down
4 changes: 4 additions & 0 deletions manifests/crd/v1/pingcap.com_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ spec:
storageAccount:
type: string
type: object
backoffLimit:
default: 0
format: int32
type: integer
backupType:
type: string
br:
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/pingcap/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2804,6 +2804,8 @@ type RestoreSpec struct {
// TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss
// +kubebuilder:default=false
TolerateSingleTiKVOutage bool `json:"tolerateSingleTiKVOutage,omitempty"`
// +kubebuilder:default=0
BackoffLimit int32 `json:"backoffLimit,omitempty"`
}

// FederalVolumeRestorePhase represents a phase to execute in federal volume restore
Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/restore/restore_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ func (rm *restoreManager) makeRestoreJob(restore *v1alpha1.Restore) (*batchv1.Jo
},
},
Spec: batchv1.JobSpec{
BackoffLimit: pointer.Int32Ptr(0),
BackoffLimit: &restore.Spec.BackoffLimit,
Template: *podSpec,
},
}
Expand Down

0 comments on commit 610a9f9

Please sign in to comment.