Skip to content

[v3-4-test] Fix scheduler crash when retrying a task that timed out or was killed externally (#75472) - #75582

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-976c1d0-v3-4-test
Oct 26, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-976c1d0-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The database callback sink committed and closed the scheduler's scoped
session when sending a callback, detaching the task instance the
scheduler was about to retry. Archiving the attempt then wrote nothing,
and inserting the next attempt hit the task_instance_current_key unique
constraint, which stopped the scheduler.

The sink now adds the request to the caller's session, and the
scheduler commits it. The Dag-lookup-failure branch of executor event
processing passes its session to set_state for the same reason.
(cherry picked from commit 976c1d0)

Co-authored-by: Kaxil Naik kaxilnaik@gmail.com

…r was killed externally (#75472)

The database callback sink committed and closed the scheduler's scoped
session when sending a callback, detaching the task instance the
scheduler was about to retry. Archiving the attempt then wrote nothing,
and inserting the next attempt hit the task_instance_current_key unique
constraint, which stopped the scheduler.

The sink now adds the request to the caller's session, and the
scheduler commits it. The Dag-lookup-failure branch of executor event
processing passes its session to set_state for the same reason.
(cherry picked from commit 976c1d0)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@vatsrahul1001
vatsrahul1001 force-pushed the backport-976c1d0-v3-4-test branch from 7b9ceeb to c5a4fa8 Compare October 26, 2026 04:01
@vatsrahul1001
vatsrahul1001 merged commit 17fc103 into v3-4-test Oct 26, 2026
109 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-976c1d0-v3-4-test branch October 26, 2026 04:45
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: bug fix merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Executors-core LocalExecutor & SequentialExecutor area:scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants