[
https://issues.apache.org/jira/browse/FLINK-29959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-29959:
-----------------------------------
Labels: pull-request-available (was: )
> 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
>
> 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)