amoghrajesh commented on code in PR #72100:
URL: https://github.com/apache/airflow/pull/72100#discussion_r3965720052
##########
airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:
##########
@@ -59,10 +59,16 @@
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:
Review Comment:
This path drops only the metadata DB reference row; with no worker in the
loop (unlike `clear_on_success`, where the worker calls `_clear_backend_only`
before the server drops the row), a custom `[workers] state_store_backend`
payload is left orphaned with no reclaim path today. Reads still route through
the DB so the "start over" behavior stays correct, but this is a real ga. For
now, I have documented the limitation in the docstring and I have a proposal in
mind for a proper fix and will follow up separately (Its an AIP proposal)
--
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]