amoghrajesh commented on code in PR #69914:
URL: https://github.com/apache/airflow/pull/69914#discussion_r3622278632


##########
providers/cncf/kubernetes/docs/operators.rst:
##########
@@ -187,6 +187,45 @@ for debugging), set ``on_kill_action="keep_pod"``:
 The ``termination_grace_period`` parameter is also respected during cleanup, 
giving the
 pod time to shut down gracefully before being forcefully terminated.
 
+Durable execution
+^^^^^^^^^^^^^^^^^
+
+If the worker running ``KubernetesPodOperator`` dies while the pod is still 
running (e.g. the
+worker is preempted or crashes) and the task is retried, the operator can 
reattach to the pod
+that is already running instead of creating a duplicate. This is controlled by 
the ``durable``
+parameter, which defaults to ``True``.
+
+On Airflow 3.3+, ``durable=True`` persists the running pod's identity (name, 
namespace) to
+:doc:`task state store <apache-airflow:core-concepts/task-state-store>` before 
the operator starts
+waiting on it. On retry, the operator reads this identity back and reconnects 
directly to that
+specific pod -- no label search, and no possibility of the ambiguity failure

Review Comment:
   Good point, softened the wording. It now reads "the reconnect step uses this 
persisted identity instead of a label search" rather than claiming the 
ambiguity failure is impossible. Handled in 0218939c74



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to