craigcondit commented on code in PR #404:
URL: https://github.com/apache/yunikorn-k8shim/pull/404#discussion_r842919250


##########
pkg/cache/context_recovery.go:
##########
@@ -136,23 +158,32 @@ func (ctx *Context) recover(mgr []interfaces.Recoverable, 
due time.Duration) err
                // doesn't have enough capacity (occupied resources not yet 
reported).
                for nodeName, occupiedResource := range nodeOccupiedResources {
                        if cachedNode := ctx.nodes.getNode(nodeName); 
cachedNode != nil {
-                               cachedNode.setOccupiedResource(occupiedResource)
+                               
cachedNode.updateOccupiedResource(occupiedResource, AddOccupiedResource)

Review Comment:
   This adds the resources rather than overwriting them, fixing a race 
condition.



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