baconYao commented on code in PR #1037:
URL: https://github.com/apache/yunikorn-core/pull/1037#discussion_r2456884420


##########
pkg/scheduler/objects/queue.go:
##########
@@ -1627,13 +1663,7 @@ func (sq *Queue) GetApplication(appID string) 
*Application {
 
 // FindQueueByAppID searches the queue hierarchy for an application with the 
given appID and returns the queue it belongs to
 func (sq *Queue) FindQueueByAppID(appID string) *Queue {
-       if sq == nil {
-               return nil
-       }
-       if sq.parent != nil {
-               return sq.parent.FindQueueByAppID(appID)
-       }
-       return sq.findQueueByAppIDInternal(appID)
+       return sq.findQueueByAppID(appID)
 }
 
 func (sq *Queue) findQueueByAppIDInternal(appID string) *Queue {

Review Comment:
   IMHO. I noticed that your approach no longer uses the 
`findQueueByAppIDInternal` function. I searched through the entire repository 
and found that it isn’t used anywhere else either, so I think you should remove 
it as well.



-- 
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]

Reply via email to