viragtripathi opened a new pull request, #69557: URL: https://github.com/apache/airflow/pull/69557
The scheduler's critical section takes a transaction-scoped advisory lock (pg_try_advisory_xact_lock) so HA schedulers coordinate instead of colliding on the pool row locks. The guard in _executable_task_instances_to_queued currently limits this to the postgresql dialect. CockroachDB 26.3 implements the same transaction-level advisory lock functions with PostgreSQL semantics, so this extends the guard to the cockroachdb dialect. Other dialects are unaffected. Minimum version for the new path: CockroachDB v26.3. Verified in an HA deployment (two schedulers) where lock acquisition and single-holder behavior were observed via pg_locks during a concurrent stress run. Discussed on the devlist: https://lists.apache.org/thread/t6jo4th3sn23jmr34m6gcxzw4k8mo4pc --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes - Claude Code Generated-by: Claude Code following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
