manirajv06 commented on code in PR #740:
URL: https://github.com/apache/yunikorn-core/pull/740#discussion_r1409083589


##########
pkg/scheduler/objects/allocation.go:
##########
@@ -152,7 +154,9 @@ func NewAllocationFromSI(alloc *si.Allocation) *Allocation {
                createTime:        time.Unix(creationTime, 0),
                allocLog:          make(map[string]*AllocationLogEntry),
        }
-       return NewAllocation(alloc.UUID, alloc.NodeID, ask)
+       newAlloc := NewAllocation(alloc.NodeID, ask)
+       newAlloc.uuid = alloc.UUID
+       return newAlloc

Review Comment:
   yes, correct.
   
   During recovery, application#addAllocationInternal populates `allocations` 
map with allocation id/uuid. While doing this, entry overrides if key exists. 
It happens while running `TestSchedulerRecovery` in 
`pkg/scheduler/tests/recovery_test.go`. If we don't have this change, this test 
fails.



-- 
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: reviews-unsubscr...@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to