-
Notifications
You must be signed in to change notification settings - Fork 820
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: karmada-controller-manager: panic: runtime error: index out of range #4145
Conversation
105b297
to
edf3c2a
Compare
Thanks @halfrost, appreciate it! cc @tedli @liangyuanpeng @NickYadance @jwcesign @chaosi-zju help to take a look~ Thanks. |
/lgtm These two functions are not used: karmada/pkg/modeling/modeling.go Line 328 in 920f5bf
karmada/pkg/modeling/modeling.go Line 274 in 920f5bf
Can we delete them? @halfrost |
02d5d6f
to
4eabd39
Compare
@jwcesign Hi, I have already removed these two functions that are currently not in use. This delete function took me some time to debug when it was initially developed. Now, they are no longer needed. Could you please review it again? |
Can you help squash the multiple commits into one? other lgtm cc @chaosi-zju for take another look |
4eabd39
to
3ff5963
Compare
@jwcesign Done |
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.
generally looks good to me
aabf1e7
to
e08196d
Compare
… solve multithreading issues 2. Delete unused functions Signed-off-by: halfrost <ydz627@gmail.com>
1c26795
to
92ab33e
Compare
/lgtm |
/cc @RainbowMango |
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.
/approve
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry for my late and I have tried triggering |
Hi, @halfrost It's this issue fixed by a single commit which asscoiated with this pr? Is there any other commits related? I didn't use the latest release, I have a my own branch, I cherry-pick this commit, it builds, run, and works. However, I run into another index out of range panic, so I thought whether my cherry pick lack some commits.
func (rs *ResourceSummary) getIndex(crn ClusterResourceNode) int {
index := math.MaxInt
for i, m := range defaultModelSorting {
tmpIndex := searchLastLessElement(rs.modelSortings[i], crn.resourceList[m])
if tmpIndex < index {
index = tmpIndex
}
}
return index
} |
What type of PR is this?
What this PR does / why we need it:
Fix issue #3854
karmada-controller-manager: panic: runtime error: index out of range
Which issue(s) this PR fixes:
Fixes #3854
Special notes for your reviewer: