jason810496 commented on code in PR #66859:
URL: https://github.com/apache/airflow/pull/66859#discussion_r3264353309
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1429,6 +1438,14 @@ def _handle_current_task_success(
stats.incr("operator_successes", tags={**stats_tags, "operator_name":
operator})
stats.incr("ti_successes", tags=stats_tags)
+ # TODO: uncomment below once https://github.com/apache/airflow/pull/66699
is merged
+ # if conf.getboolean("state_store", "clear_on_success"):
+ # log.info("Task state will be cleared by the server because
clear_on_success is enabled.")
+ #
+ # if _get_worker_state_backend() is not None:
+ # # clear the task state keys for custom state backends configured
on worker side
+ # context["task_state"].clear()
Review Comment:
May I double check that the TODO comment here will only clear the worker
backend (custom backend) and the following `ti_update_state` Execution API
will only clear the DB reference?
Not sure if I understand the execution flow correctly?
https://github.com/apache/airflow/blob/41a6436a1dd6ac82a1504db145e2958fd426a1fd/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py#L468-L491
--
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]