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


##########
airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:
##########
@@ -59,10 +59,24 @@
 log = structlog.get_logger(__name__)
 
 
-def _clear_task_state_store_on_success(tis: Sequence[TI], session: Session) -> 
None:
-    """Clear task state store rows for each TI if clear_on_success is 
enabled."""
-    if not conf.getboolean("state_store", "clear_on_success", fallback=False):
-        return
+def _discard_task_state_store(tis: Sequence[TI], session: Session, *, event: 
str) -> None:
+    """
+    Discard the task state store entries of each task instance.
+
+    A failure to discard one task instance is logged and skipped rather than 
raised, so one bad

Review Comment:
   Fixed. The loop now breaks on the first failure instead of continuing, so it 
doesn't process further entries against an already aborted Postgres 
transaction. Docstring updated to describe that behavior instead of claiming 
full per-entry isolation.
   
   



-- 
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