This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2fe52abc2c0 AGENTS.md: Require batching for bulk DELETE/UPDATE in
scheduler (#66908)
2fe52abc2c0 is described below
commit 2fe52abc2c0cda18c32e4d92397f8da3532912eb
Author: Jason(Zhe-You) Liu <[email protected]>
AuthorDate: Fri May 15 09:41:40 2026 +0800
AGENTS.md: Require batching for bulk DELETE/UPDATE in scheduler (#66908)
---
AGENTS.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/AGENTS.md b/AGENTS.md
index 1fc6aed1151..476a48f88b9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -137,6 +137,7 @@ reported as such are described in "What is NOT considered a
security vulnerabili
- Imports at top of file. Valid exceptions: circular imports, lazy loading for
worker isolation, `TYPE_CHECKING` blocks.
- Guard heavy type-only imports (e.g., `kubernetes.client`) with
`TYPE_CHECKING` in multi-process code paths.
- Define dedicated exception classes or use existing exceptions such as
`ValueError` instead of raising the broad `AirflowException` directly. Each
error case should have a specific exception type that conveys what went wrong.
+- Bulk `DELETE`/`UPDATE` in the scheduler loop or any synchronous interval
task (e.g. `call_regular_interval` callbacks) must be batched with `LIMIT` and
committed between batches — never issue a single unbounded bulk write against a
user-driven table. Unbounded bulk writes hold row locks for the entire
transaction (blocking concurrent writers) and stall the scheduler main loop.
Filter columns used by the cleanup must be indexed. Follow the batching pattern
in `airflow-core/src/airflow/u [...]
- Apache License header on all new files (prek enforces this).
- Newsfragments are only used by distributions whose release process consumes
them via towncrier — currently `airflow-core/newsfragments/`,
`chart/newsfragments/`, and `dev/mypy/newsfragments/` — and only for major or
breaking changes (usually coordinated during review; do not add by default).
**Never add newsfragments for `providers/` or `airflow-ctl/`** — those
distributions are released from `main` and their release managers regenerate
the changelog from `git log`, so per-PR newsfragm [...]