k8s.io/apiserver: make maxRetryWhenPatchConflicts public
Kubernetes-commit: be6be1370b5d1c9b6269c24f663426e3bac93c72
This commit is contained in:
parent
43ba6dde7a
commit
18fcdcc57b
|
@ -104,8 +104,8 @@ func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Reque
|
|||
// may be used to deserialize an options object to pass to the getter.
|
||||
type getterFunc func(ctx request.Context, name string, req *restful.Request) (runtime.Object, error)
|
||||
|
||||
// maxRetryWhenPatchConflicts is the maximum number of conflicts retry during a patch operation before returning failure
|
||||
const maxRetryWhenPatchConflicts = 5
|
||||
// MaxRetryWhenPatchConflicts is the maximum number of conflicts retry during a patch operation before returning failure
|
||||
const MaxRetryWhenPatchConflicts = 5
|
||||
|
||||
// getResourceHandler is an HTTP handler function for get requests. It delegates to the
|
||||
// passed-in getterFunc to perform the actual get.
|
||||
|
@ -742,7 +742,7 @@ func patchResource(
|
|||
|
||||
return finishRequest(timeout, func() (runtime.Object, error) {
|
||||
updateObject, _, updateErr := patcher.Update(ctx, name, updatedObjectInfo)
|
||||
for i := 0; i < maxRetryWhenPatchConflicts && (errors.IsConflict(updateErr)); i++ {
|
||||
for i := 0; i < MaxRetryWhenPatchConflicts && (errors.IsConflict(updateErr)); i++ {
|
||||
lastConflictErr = updateErr
|
||||
updateObject, _, updateErr = patcher.Update(ctx, name, updatedObjectInfo)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue