Dennis-Mircea Ciupitu created FLINK-41710:
---------------------------------------------
Summary: Deleting an IN_PROGRESS FlinkStateSnapshot never completes
Key: FLINK-41710
URL: https://issues.apache.org/jira/browse/FLINK-41710
Project: Flink
Issue Type: Bug
Components: Kubernetes Operator
Reporter: Dennis-Mircea Ciupitu
h1. Problem
Deleting a {{FlinkStateSnapshot}} whose status is {{IN_PROGRESS}} never
completes. This case is needed for stale snapshots that have passed a certain
age.
In this case, the resource stays in {{Terminating}} with the operator finalizer
indefinitely. The operator logs {{Cannot delete resource <name> yet as
savepoint is still in progress...}} once per reconcile interval, and the
savepoint that Flink has meanwhile completed is neither recorded in the status
nor disposed, even with {{{}disposeOnDelete: true{}}}.
An operator restart does not release it. Only removing the finalizer by hand
does.
h1. Root cause
Once the resource carries a {{{}deletionTimestamp{}}}, JOSDK dispatches every
event for it to {{cleanup}} and never to {{{}reconcile{}}}. The only code that
moves a snapshot from {{IN_PROGRESS}} to {{COMPLETED}} or {{FAILED}} is
{{{}StateSnapshotObserver{}}}, which runs from {{reconcile}} only.
{{StateSnapshotReconciler#cleanup}} therefore reads the same stored
{{IN_PROGRESS}} state on every attempt, returning {{noFinalizerRemoval()}} with
a reschedule, and looping forever.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)