Skip to content

[v3-4-test] Return 5xx on database deadlock when updating task state (#75368) - #75652

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-840d3a4-v3-4-test
Oct 26, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-840d3a4-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

A deadlock is transient and the task would succeed on a retry, but the
catch-all around the state update marked the task instance FAILED, which
is permanent. The Task SDK client already retries 5xx responses from the
Execution API, so letting the deadlock surface as a 500 gives the worker
that retry.

Only deadlocks are treated this way. Recognising other lock errors would
change how existing callers of is_lock_not_available_error behave.
(cherry picked from commit 840d3a4)

Co-authored-by: Wei Lee weilee@apache.org

…75368)

A deadlock is transient and the task would succeed on a retry, but the
catch-all around the state update marked the task instance FAILED, which
is permanent. The Task SDK client already retries 5xx responses from the
Execution API, so letting the deadlock surface as a 500 gives the worker
that retry.

Only deadlocks are treated this way. Recognising other lock errors would
change how existing callers of is_lock_not_available_error behave.
(cherry picked from commit 840d3a4)

Co-authored-by: Wei Lee <weilee@apache.org>
@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk labels Oct 26, 2026
@Lee-W Lee-W added this to the Airflow 3.4.0 milestone Oct 26, 2026
@Lee-W
Lee-W marked this pull request as ready for review October 26, 2026 11:54
@vatsrahul1001
vatsrahul1001 merged commit 22538bf into v3-4-test Oct 26, 2026
95 of 109 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-840d3a4-v3-4-test branch October 26, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants