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 race conditions when handling barriers #5510

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Mar 13, 2024

  • Avoid race condition when creating a barrier by using ON CONFLICT DO NOTHING like we already do for job networks
  • Avoid race conditions when waiting on and destroying barriers by calling
    update/delete on the search results (and not a single search result) so
    the update/deletion is just not affecting any rows instead of running
    into row not found
  • See https://progress.opensuse.org/issues/156754

The handling of normal locks should probably be improved as well but is not covered here.

@okurz okurz mentioned this pull request Mar 14, 2024
* Avoid race condition when creating a barrier by using `ON CONFLICT DO
  NOTHING` like we already do for job networks
* Avoid race conditions when waiting on and destroying barriers by calling
  update/delete on the search results (and not a single search result) so
  the update/deletion is just not affecting any rows instead of running
  into `row not found`
* See https://progress.opensuse.org/issues/156754
@Martchus Martchus marked this pull request as ready for review March 14, 2024 11:11
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.38%. Comparing base (40a3af5) to head (57d20c6).
Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5510   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         391      391           
  Lines       37930    37930           
=======================================
  Hits        37318    37318           
  Misses        612      612           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot merged commit 7d0dd22 into os-autoinst:master Mar 18, 2024
42 checks passed
@Martchus Martchus deleted the lockapi-fixes branch March 18, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants