Skip to content

Commit 6192143

Browse files
authored
Update problemenvironment_controller.go
1 parent 28bbefa commit 6192143

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

controllers/controller-manager/problemenvironment_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ func (r *ProblemEnvironmentReconciler) electWorker(
193193
return ""
194194
}
195195
sort.Slice(arr, func(i, j int) bool {
196-
if arr[i].Count != arr[j].Count {
197-
return arr[i].Count < arr[j].Count
198-
}
199-
200196
scoreI := arr[i].CPUUsedPercent + arr[i].MemoryUsedPercent
201197
scoreJ := arr[j].CPUUsedPercent + arr[j].MemoryUsedPercent
202198
return scoreI < scoreJ

0 commit comments

Comments
 (0)