Skip to content

Fix backfill completion race#68729

Open
PrithviBadiga wants to merge 2 commits into
apache:mainfrom
PrithviBadiga:prithvi/backfill-complete-race
Open

Fix backfill completion race#68729
PrithviBadiga wants to merge 2 commits into
apache:mainfrom
PrithviBadiga:prithvi/backfill-complete-race

Conversation

@PrithviBadiga

Copy link
Copy Markdown
Contributor

Fixes a backfill completion race where a backfill could be marked complete before all associated work had reached a terminal state.

Updates:

  • make _mark_backfills_complete check unresolved BackfillDagRun associations rather than only unfinished DagRun.backfill_id rows
  • preserve dag_run_id on BackfillDagRun rows when a matching DagRun already exists or is in-flight
  • add a regression test covering an in-flight association linked to a queued DagRun

This keeps backfills open until all tracked backfill work has actually resolved.

This closes: #68721

@boring-cyborg boring-cyborg Bot added the area:Scheduler including HA (high availability) scheduler label Jun 18, 2026
@PrithviBadiga PrithviBadiga force-pushed the prithvi/backfill-complete-race branch from 8ec4798 to cfc9794 Compare June 18, 2026 21:58
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backfill premature completion (confirmed on Airflow 3.2.2)

2 participants