karmada
karmada copied to clipboard
priority: backoffQ heap algorithm uses backoff completed time to sort bindings
What type of PR is this? /kind bug
What this PR does / why we need it: This PR includes:
- The sorting of elements in the BackOff queue should be based on the binding's
expiryrather than its priority. Otherwise, bindings whose BackOff period has ended might not be scheduled on time.
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
cc @whitewindmills Please take a look~
thanks, so quickly, I'll take a look tomorrow. /assign
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.
Project coverage is 49.42%. Comparing base (
e2f0e6e) to head (956b2c4).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pkg/scheduler/internal/queue/scheduling_queue.go | 55.55% | 4 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #6216 +/- ##
==========================================
+ Coverage 49.33% 49.42% +0.08%
==========================================
Files 678 678
Lines 55122 55130 +8
==========================================
+ Hits 27195 27247 +52
+ Misses 26156 26110 -46
- Partials 1771 1773 +2
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 49.42% <63.63%> (+0.08%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/lgtm /cc @RainbowMango do you want to take a look?
ok. /assign
New changes are detected. LGTM label has been removed.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from rainbowmango. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Will be tracked and completed by the new pr https://github.com/karmada-io/karmada/pull/6987
@zhzhuang-zju Hey, I just realized this PR actually already fixes the incorrect sorting function in backoffQ — wondering why it hasn’t been merged yet? 🤣
@rayo1uo Hah, great minds think alike! I also discovered the issue by reading the source code back then, so when I saw your PR, it felt very familiar—and pleasantly surprising!
As for why it wasn’t merged, it was mainly because I didn’t follow up actively afterward—there’s no special reason behind it. I’ll gladly help review and push for your PR to get merged!
I totally missed this after the first round of review. Sorry. But glad and thanks to @rayo1uo for bringing this up.