Gyula Fora created FLINK-29959:
----------------------------------
Summary: Use optimistic locking when patching resource status
Key: FLINK-29959
URL: https://issues.apache.org/jira/browse/FLINK-29959
Project: Flink
Issue Type: Improvement
Components: Kubernetes Operator
Reporter: Gyula Fora
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)