Closed whitewindmills closed 2 months ago
/cc @RainbowMango @chaosi-zju
Attention: Patch coverage is 0%
with 44 lines
in your changes are missing coverage. Please review.
Project coverage is 51.40%. Comparing base (
413a15a
) to head (e88797b
). Report is 76 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
pkg/detector/preemption.go | 0.00% | 44 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
ping @RainbowMango @chaosi-zju Kindly help to take a look, thanks.
the code in this PR looks good, thank you for your effort!
Using the natural ordering properties of red-black trees to sort the listed policies to ensure the higher priority (Cluster)PropagationPolicy being processed first to avoid possible multiple preemption.
Seems this PR trying to fix a bug?
Seems this PR trying to fix a bug?
More like optimization cause multiple preemptions do not affect its functionality.
@chaosi-zju @RainbowMango PTAL~
ping @RainbowMango
/assign
By the way, have you ever considered the PriorityQueue which looks like more simple than the tree.
By the way, have you ever considered the PriorityQueue which looks like more simple than the tree.
Nice reminder.
Their performance is almost the same(both O(logN
), but using the priority queue code is more concise.
@RainbowMango PTAL
Seems the related testing is failing:
• [FAILED] [425.271 seconds]
[Preemption] propagation policy preemption testing when [ClusterPropagationPolicy Preemption] ClusterPropagationPolicy preempts another ClusterPropagationPolicy High-priority ClusterPropagationPolicy reduces priority to be preempted by low-priority ClusterPropagationPolicy [It] Propagate the deployment with the high-priority ClusterPropagationPolicy and then reduce it's priority to be preempted by the low-priority ClusterPropagationPolicy
https://github.com/karmada-io/karmada/actions/runs/8078521320/job/22071318982?pr=4555
@RainbowMango Ready to review again.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: RainbowMango
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this? /kind feature /kind cleanup
What this PR does / why we need it: Using the natural ordering properties of red-black trees to sort the listed policies to ensure the higher priority (Cluster)PropagationPolicy being processed first to avoid possible multiple preemption.
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: