[ 
https://issues.apache.org/jira/browse/YUNIKORN-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035967#comment-18035967
 ] 

Peter Bacsko commented on YUNIKORN-3148:
----------------------------------------

[~jchenjc22] thanks, i'll check it, but I think fundamentally we both 
implemented the same thing, eg. tracking headroom on each level: 
https://github.com/pbacsko/incubator-yunikorn-core/commit/c4796debfa9cddd4ae9eaea223c5f024946a78a8

> Incorrect headroom calculation when collecting outstanding requests
> -------------------------------------------------------------------
>
>                 Key: YUNIKORN-3148
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-3148
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - scheduler
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Blocker
>         Attachments: queue_outstanding_requests_test.go, 
> yunikorn-queue-headroom-fix.patch
>
>
>  YUNIKORN-2794 introduced a bug in the Application code. We're no longer 
> mutating the {{headRoom}} object in-place in 
> {{{}Application.getOutstandingRequests(){}}}, instead, we re-assign its value 
> to a newly created object.
> Before:
> {noformat}
> headRoom.SubOnlyExisting(request.GetAllocatedResource())
> userHeadRoom.SubOnlyExisting(request.GetAllocatedResource()) {noformat}
> After:
> {noformat}
> headRoom = resources.SubOnlyExisting(headRoom, request.GetAllocatedResource())
> userHeadRoom = resources.SubOnlyExisting(userHeadRoom, 
> request.GetAllocatedResource())  {noformat}
> Problem is, this does not change the object pointed to outside the function, 
> so every iteration in {{Queue.GetQueueOutstandingRequests()}} starts with the 
> original {{headRoom}} value for every application. This leads to undesired 
> behavior, because we'll end up collecting more asks than needed, which in 
> turn triggers unnecessary cluster upscale.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to