chenyulin0719 commented on code in PR #936:
URL: https://github.com/apache/yunikorn-core/pull/936#discussion_r1714087523
##########
pkg/scheduler/objects/queue.go:
##########
@@ -1242,9 +1240,6 @@ func (sq *Queue) internalGetMax(parentLimit
*resources.Resource) *resources.Reso
defer sq.RUnlock()
// no parent queue limit set, not even for root
if parentLimit == nil {
- if sq.maxResource == nil {
- return nil
- }
Review Comment:
I think we should keep the nil check to prevent panic error, even though
it's not possible in the current production code. (root queue always have
maxResource)
Additionally, it seems that the nil checks for`parentLimit` and
`sq.maxResource` in `internalGetMax()` are redundant, the
resources.ComponentWiseMin(parentLimit, sq.maxResource) will do the same check.
https://github.com/wilfred-s/yunikorn-core/blob/a8537787fd20c65c56357d15a7219879d586c21c/pkg/scheduler/objects/queue.go#L1241-L1248
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]