Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-29959

Use optimistic locking when patching resource status

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              gyfora Gyula Fora
              gyfora Gyula Fora
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: