You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "pbacsko (via GitHub)" <gi...@apache.org> on 2023/02/23 14:38:49 UTC

[GitHub] [yunikorn-k8shim] pbacsko commented on a diff in pull request #541: [YUNIKORN-1597] Gang scheduling: application might not transition to Running after recovery

pbacsko commented on code in PR #541:
URL: https://github.com/apache/yunikorn-k8shim/pull/541#discussion_r1115787853


##########
pkg/cache/task.go:
##########
@@ -213,12 +213,12 @@ func (task *Task) initialize() {
 
 	// task needs recovery means the task has already been
 	// scheduled by us with an allocation, instead of starting
-	// from New, directly set the task to Allocated.
+	// from New, directly set the task to Bound.
 	if utils.NeedRecovery(task.pod) {
 		task.allocationUUID = string(task.pod.UID)
 		task.nodeName = task.pod.Spec.NodeName
-		task.sm.SetState(TaskStates().Allocated)
-		log.Logger().Info("set task as Allocated",
+		task.sm.SetState(TaskStates().Bound)

Review Comment:
   After analyzing the existing code, this seems to be a safe change. It is more sound to use Bound.



-- 
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-unsubscribe@yunikorn.apache.org

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