Skip to content

Commit 610a9f9

Browse files
authored
br: Allow restore retry if failed (#6092)
1 parent e84b19c commit 610a9f9

File tree

6 files changed

+37
-1
lines changed

6 files changed

+37
-1
lines changed

docs/api-references/docs.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,16 @@ bool
17131713
<p>TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss</p>
17141714
</td>
17151715
</tr>
1716+
<tr>
1717+
<td>
1718+
<code>backoffLimit</code></br>
1719+
<em>
1720+
int32
1721+
</em>
1722+
</td>
1723+
<td>
1724+
</td>
1725+
</tr>
17161726
</table>
17171727
</td>
17181728
</tr>
@@ -15759,6 +15769,16 @@ bool
1575915769
<p>TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss</p>
1576015770
</td>
1576115771
</tr>
15772+
<tr>
15773+
<td>
15774+
<code>backoffLimit</code></br>
15775+
<em>
15776+
int32
15777+
</em>
15778+
</td>
15779+
<td>
15780+
</td>
15781+
</tr>
1576215782
</tbody>
1576315783
</table>
1576415784
<h3 id="restorestatus">RestoreStatus</h3>

manifests/crd.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22493,6 +22493,10 @@ spec:
2249322493
storageAccount:
2249422494
type: string
2249522495
type: object
22496+
backoffLimit:
22497+
default: 0
22498+
format: int32
22499+
type: integer
2249622500
backupType:
2249722501
type: string
2249822502
br:

manifests/crd/v1/pingcap.com_restores.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,10 @@ spec:
11671167
storageAccount:
11681168
type: string
11691169
type: object
1170+
backoffLimit:
1171+
default: 0
1172+
format: int32
1173+
type: integer
11701174
backupType:
11711175
type: string
11721176
br:

pkg/apis/pingcap/v1alpha1/openapi_generated.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/pingcap/v1alpha1/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,6 +2804,8 @@ type RestoreSpec struct {
28042804
// TolerateSingleTiKVOutage indicates whether to tolerate a single failure of a store without data loss
28052805
// +kubebuilder:default=false
28062806
TolerateSingleTiKVOutage bool `json:"tolerateSingleTiKVOutage,omitempty"`
2807+
// +kubebuilder:default=0
2808+
BackoffLimit int32 `json:"backoffLimit,omitempty"`
28072809
}
28082810

28092811
// FederalVolumeRestorePhase represents a phase to execute in federal volume restore

pkg/backup/restore/restore_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ func (rm *restoreManager) makeRestoreJob(restore *v1alpha1.Restore) (*batchv1.Jo
921921
},
922922
},
923923
Spec: batchv1.JobSpec{
924-
BackoffLimit: pointer.Int32Ptr(0),
924+
BackoffLimit: &restore.Spec.BackoffLimit,
925925
Template: *podSpec,
926926
},
927927
}

0 commit comments

Comments
 (0)