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

fix(scan): fix deadlock on resource transactions during concurrent scans #5968

Conversation

vicferpoy
Copy link
Member

Context

During concurrent scans in different Celery workers, there are situations where the same resource is accessed in different transactions, causing a deadlock.

Description

A configurable retry mechanism has been added to handle these situations, terminating the locked transaction and trying again after a short time.

image

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vicferpoy vicferpoy requested a review from a team as a code owner November 29, 2024 13:42
@vicferpoy vicferpoy requested a review from jfagoagas November 29, 2024 13:42
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, thanks @vicferpoy 🚀

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 61.90476% with 16 lines in your changes missing coverage. Please review.

Project coverage is 92.71%. Comparing base (bcf1ef1) to head (284e360).
Report is 501 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5968      +/-   ##
==========================================
+ Coverage   89.93%   92.71%   +2.77%     
==========================================
  Files        1147       58    -1089     
  Lines       35599     4805   -30794     
==========================================
- Hits        32017     4455   -27562     
+ Misses       3582      350    -3232     
Components Coverage Δ
prowler ∅ <ø> (∅)
api 92.71% <61.90%> (∅)

@vicferpoy vicferpoy merged commit 9794b5c into master Nov 29, 2024
12 of 13 checks passed
@vicferpoy vicferpoy deleted the PRWLR-5508-fix-deadlock-on-resource-transactions-during-concurrent-scans branch November 29, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants