Skip to content

Log and audit when the partitioned Dag run per-tick cap is reached - #71072

Open
Lee-W wants to merge 2 commits into
apache:mainfrom
astronomer:scheduler-partition-cap-visibility
Open

Log and audit when the partitioned Dag run per-tick cap is reached#71072
Lee-W wants to merge 2 commits into
apache:mainfrom
astronomer:scheduler-partition-cap-visibility

Conversation

@Lee-W

@Lee-W Lee-W commented Aug 4, 2026

Copy link
Copy Markdown
Member

Why

It's not noticeable when the APDR cap is reached.

What

Emits a scheduler warning on every tick the cap is hit, plus a single partition dag run cap reached audit Log row per backlog episode.

The audit row is written through create_session(scoped=False) so the caller's @retry_db_transaction rollback cannot discard it; it must stay ahead of any other write in the tick or the extra connection can lock-contend on SQLite.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:Scheduler including HA (high availability) scheduler label Aug 4, 2026
@Lee-W
Lee-W force-pushed the scheduler-partition-cap-visibility branch 2 times, most recently from 1b505e8 to aa91e1c Compare August 4, 2026 14:34
Emits a scheduler warning on every tick the cap is hit, plus a single
`partition dag run cap reached` audit Log row per backlog episode.

The audit row is written through `create_session(scoped=False)` so the
caller's `@retry_db_transaction` rollback cannot discard it; it must stay
ahead of any other write in the tick or the extra connection can
lock-contend on SQLite.
@Lee-W
Lee-W force-pushed the scheduler-partition-cap-visibility branch from aa91e1c to ed6751e Compare August 4, 2026 14:44
@Lee-W
Lee-W marked this pull request as ready for review August 4, 2026 15:25
@Lee-W
Lee-W requested review from XD-DENG and ashb as code owners August 4, 2026 15:25
@Lee-W

Lee-W commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

cc @TJaniF

@Lee-W Lee-W self-assigned this Aug 5, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant