zhuqi-lucas commented on code in PR #950:
URL: https://github.com/apache/yunikorn-core/pull/950#discussion_r1721443494


##########
pkg/scheduler/objects/application.go:
##########
@@ -1660,6 +1664,8 @@ func (sa *Application) addAllocationInternal(allocType 
AllocationResultType, all
                sa.incUserResourceUsage(alloc.GetAllocatedResource())
                sa.allocatedPlaceholder = 
resources.Add(sa.allocatedPlaceholder, alloc.GetAllocatedResource())
                sa.maxAllocatedResource = 
resources.ComponentWiseMax(sa.allocatedPlaceholder, sa.maxAllocatedResource)
+               sa.allocatedPlaceholder.Prune()
+               sa.maxAllocatedResource.Prune()

Review Comment:
   Thanks @wilfred-s , it makes sense to me, we only need prune for sub subFrom 
if we add positive value.



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