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

Race condition in multiple triggerer process can lead to both picking up same trigger. #27057

Closed
2 tasks done
iw-pavan opened this issue Oct 14, 2022 · 2 comments · Fixed by #27072
Closed
2 tasks done
Assignees
Labels
affected_version:main_branch Issues Reported for main branch area:Triggerer kind:bug This is a clearly a bug

Comments

@iw-pavan
Copy link
Contributor

iw-pavan commented Oct 14, 2022

Apache Airflow version

main (development)

What happened

Currently airflow triggerer loop picks triggers to process by below steps

query_unassinged_Triggers
update_triggers from above id
query which triggers are assigned to current process

If two triggerer process executes above queries in below order

query unassigned trigger both will get all triggers then if one triggerer completes 2nd and 3rd operation before 2nd triggerer does 2nd operation that will lead to both triggerer running same triggers
there is sync happening after that but unnecessary cleanup operations are done in that case.

What you think should happen instead

There should be locking on rows which are updated.

How to reproduce

No response

Operating System

All

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

HA setup with multiple triggerers can have this issue

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@iw-pavan iw-pavan added area:core kind:bug This is a clearly a bug labels Oct 14, 2022
@o-nikolas
Copy link
Contributor

Hey @iw-pavan! Thanks for submitting this issue 😄 I see that you've checked that you're willing to submit a PR, would you like me to assign this issue to you?

@pavansharma36
Copy link
Contributor

@o-nikolas I've raised PR with fix, you can assign this to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:main_branch Issues Reported for main branch area:Triggerer kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants