Fix lock releasing logic in scheduler#1031
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1031 +/- ##
==========================================
- Coverage 74.36% 74.27% -0.10%
==========================================
Files 90 90
Lines 12496 12469 -27
Branches 2193 2182 -11
==========================================
- Hits 9293 9261 -32
- Misses 2682 2689 +7
+ Partials 521 519 -2 ☔ View full report in Codecov by Sentry. |
32ad971 to
fb4f36b
Compare
This commit fixes the lock releasing logic in the `DefaultScheduler` class, avoiding spurious calls to the `release` method of a `Lock` object aftere waking up on a `Condition` variable.
e317586 to
e1cfaf9
Compare
e1cfaf9 to
3f8f4be
Compare
LanderOtto
approved these changes
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit streamlines the
DefaultSchedulerby removing thewait_queuesandlocksattributes for each deployment and introducing a singlewait_queue. Previously, the combination of double locks added unnecessary complexity and was difficult to maintain. Furthermore, stacked deployments were not handled properly, leading to deadlocks or exceptions when theretry_intervalattribute was not defined by the user.Now, when a job frees resources, the waiting jobs are notified.