[ 
https://issues.apache.org/jira/browse/FLINK-29959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gyula Fora closed FLINK-29959.
------------------------------
    Fix Version/s: kubernetes-operator-1.3.0
       Resolution: Fixed

merged to main 99dc38f1270ae9b13a8b461df8a0bf66e9d8b5f7

> Use optimistic locking when patching resource status
> ----------------------------------------------------
>
>                 Key: FLINK-29959
>                 URL: https://issues.apache.org/jira/browse/FLINK-29959
>             Project: Flink
>          Issue Type: Bug
>          Components: Kubernetes Operator
>            Reporter: Gyula Fora
>            Assignee: Gyula Fora
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: kubernetes-operator-1.3.0
>
>
> The operator currently does not use optimistic locking on the CR when 
> patching status. This worked because we always wanted to overwrite the status.
> With leader election and potentially two operators running at the same time, 
> we are now exposed to some race conditions that were not previously present 
> with the status update logic.
> To ensure that the operator always sees the latest status we should change 
> our logic to optimistic locking with retries. If we get a lock error 
> (resource updated) we check if only the spec changed and then retry locking 
> on the new version.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to