pbacsko commented on code in PR #597:
URL: https://github.com/apache/yunikorn-core/pull/597#discussion_r1275329628


##########
pkg/scheduler/objects/application.go:
##########
@@ -1712,6 +1715,17 @@ func (sa *Application) ReplaceAllocation(uuid string) 
*Allocation {
        if sa.placeholderData != nil {
                sa.placeholderData[ph.GetTaskGroup()].Replaced++
        }
+
+       // check if we have active placeholder allocation left
+       hasReplaceablePlaceholder := false
+       for _, phData := range sa.placeholderData {
+               if phData.Count > (phData.Replaced + phData.TimedOut) {
+                       hasReplaceablePlaceholder = true
+                       break
+               }
+       }
+       sa.hasPlaceholderAlloc.Store(hasReplaceablePlaceholder)

Review Comment:
   This part is crucial and needs to be checked carefully. If we replaced all 
PHs, we set it back to false so we won't bother with further PH allocations.



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