Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry transactions on occasional deadlocks for rendered fields #32341

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Jul 4, 2023

This is a follow-up on #18616 where we introduced retries on the occassional deadlocks when rendered task fields have been deleted by parallel threads (this is not a real deadlock, it's because MySQL locks too many things when queries are executed and will deadlock when one of those queries wait too much).

Adding retry - while not perfect - should allow to handle the problem and significantly decrease the likelihood of such deadlocks.

We can probably think about different approach for rendered fields, but for now retrying is - I think - acceptable short-term fix.

Fixes: #32294
Fixes: #29687


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

This is a follow-up on apache#18616 where we introduced retries on the
occassional deadlocks when rendered task fields have been deleted
by parallel threads (this is not a real deadlock, it's because
MySQL locks too many things when queries are executed and will
deadlock when one of those queries wait too much).

Adding retry - while not perfect - should allow to handle the
problem and significantly decrease the likelihood of such
deadlocks.

We can probably think about different approach for rendered fields,
but for now retrying is - I think - acceptable short-term fix.

Fixes: apache#32294
Fixes: apache#29687
@potiuk potiuk force-pushed the retry-occassional-deadlocks branch from 8b13190 to c7e188f Compare July 4, 2023 14:09
@potiuk potiuk merged commit c8a3c11 into apache:main Jul 5, 2023
42 checks passed
@potiuk potiuk deleted the retry-occassional-deadlocks branch July 5, 2023 11:28
@potiuk potiuk added this to the Airlfow 2.6.3 milestone Jul 5, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Jul 6, 2023
ephraimbuddy pushed a commit that referenced this pull request Jul 6, 2023
This is a follow-up on #18616 where we introduced retries on the
occassional deadlocks when rendered task fields have been deleted
by parallel threads (this is not a real deadlock, it's because
MySQL locks too many things when queries are executed and will
deadlock when one of those queries wait too much).

Adding retry - while not perfect - should allow to handle the
problem and significantly decrease the likelihood of such
deadlocks.

We can probably think about different approach for rendered fields,
but for now retrying is - I think - acceptable short-term fix.

Fixes: #32294
Fixes: #29687
(cherry picked from commit c8a3c11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-fix Changelog: Bug Fixes
Projects
None yet
3 participants