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 GT job creation races #7096

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Fix GT job creation races #7096

merged 2 commits into from
Nov 7, 2023

Conversation

zhiltsov-max
Copy link
Contributor

Motivation and context

It's possible to get more than 1 GT job in a task in the case of concurrent creation requests.
This PR fixes this by introducing a task row-level lock in the DB for the update transaction.

  • Fixed GT job creation race condition

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Merging #7096 (e9d0212) into develop (060fef0) will increase coverage by 0.08%.
Report is 10 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #7096      +/-   ##
===========================================
+ Coverage    82.30%   82.39%   +0.08%     
===========================================
  Files          361      361              
  Lines        39222    39310      +88     
  Branches      3588     3591       +3     
===========================================
+ Hits         32283    32390     +107     
+ Misses        6939     6920      -19     
Components Coverage Δ
cvat-ui 77.34% <ø> (+0.04%) ⬆️
cvat-server 87.02% <100.00%> (+0.11%) ⬆️

Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

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

LGTM

@nmanovic nmanovic merged commit 1ef6ba0 into develop Nov 7, 2023
34 checks passed
@nmanovic nmanovic deleted the zm/fix-atomic-uses branch November 7, 2023 17:03
This was referenced Nov 22, 2023
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.

None yet

2 participants