-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: OPTIC-1438: Locking summary for update before reset #7127
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7127 +/- ##
===========================================
- Coverage 77.11% 77.10% -0.01%
===========================================
Files 183 183
Lines 14414 14421 +7
===========================================
+ Hits 11116 11120 +4
- Misses 3298 3301 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/fm sync |
/git merge develop
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I'd be curious as to how this influences performance with regards to importing tasks. Overall it cannot be escaped that this must adhere to a certain logical guarantee, otherwise there are potential race conditions which could occur.
@bmartel completely agree, I'll monitor performance around this to see the impact this has. |
/git merge develop
|
/git merge develop
|
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
Describe the reason for change
I've identified a potential race condition on data reimport.
This PR adds a select_for_update on the summary before the creation of tasks and before checking the number of tasks on a potential reset. This should lock one of them out, not allowing the scenario described above.