Skip to content

[v3-1-test] Fix scheduler heartbeat misses caused by slow reschedule dependency check (#61983)#62068

Merged
ephraimbuddy merged 2 commits intov3-1-testfrom
backport-60931-61983
Feb 17, 2026
Merged

[v3-1-test] Fix scheduler heartbeat misses caused by slow reschedule dependency check (#61983)#62068
ephraimbuddy merged 2 commits intov3-1-testfrom
backport-60931-61983

Conversation

@ephraimbuddy
Copy link
Copy Markdown
Contributor

guan404ming and others added 2 commits February 17, 2026 11:10
…heck (#61983)

When many task instances enter UP_FOR_RESCHEDULE state, the query
to fetch the latest reschedule date becomes slow due to a missing
composite index. This causes the scheduler to miss heartbeats.

Previously only sensors used reschedule mode, but since
fddf4a7, non-sensor tasks can
also be rescheduled, significantly increasing the number of rows
per task instance in the task_reschedule table.

Add a composite (ti_id, id DESC) index to the task_reschedule
table, replacing the single-column (ti_id) index.

(cherry picked from commit 9880716)
@ephraimbuddy ephraimbuddy added this to the Airflow 3.1.8 milestone Feb 17, 2026
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Feb 17, 2026
@ephraimbuddy ephraimbuddy merged commit 6157202 into v3-1-test Feb 17, 2026
66 checks passed
@ephraimbuddy ephraimbuddy deleted the backport-60931-61983 branch February 17, 2026 11:09
vatsrahul1001 pushed a commit that referenced this pull request Mar 4, 2026
…dependency check (#61983) (#62068)

* Add index on task_reschedule ti_id (#60931)

(cherry picked from commit 14e811c)

* Fix scheduler heartbeat misses caused by slow reschedule dependency check (#61983)

When many task instances enter UP_FOR_RESCHEDULE state, the query
to fetch the latest reschedule date becomes slow due to a missing
composite index. This causes the scheduler to miss heartbeats.

Previously only sensors used reschedule mode, but since
fddf4a7, non-sensor tasks can
also be rescheduled, significantly increasing the number of rows
per task instance in the task_reschedule table.

Add a composite (ti_id, id DESC) index to the task_reschedule
table, replacing the single-column (ti_id) index.

(cherry picked from commit 9880716)

---------

Co-authored-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:db-migrations PRs with DB migration kind:documentation type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants