chia7712 commented on code in PR #873:
URL: https://github.com/apache/yunikorn-k8shim/pull/873#discussion_r1713005118


##########
pkg/cache/context.go:
##########
@@ -873,19 +871,19 @@ func (ctx *Context) StartPodAllocation(podKey string, 
nodeID string) bool {
        return ctx.schedulerCache.StartPodAllocation(podKey, nodeID)
 }
 
-func (ctx *Context) notifyTaskComplete(appID, taskID string) {
-       log.Log(log.ShimContext).Debug("NotifyTaskComplete",
-               zap.String("appID", appID),
-               zap.String("taskID", taskID))
-       if app := ctx.GetApplication(appID); app != nil {
-               log.Log(log.ShimContext).Debug("release allocation",
-                       zap.String("appID", appID),
+func (ctx *Context) notifyTaskComplete(app *Application, taskID string) {
+       if app == nil {
+               log.Log(log.ShimContext).Debug("In notifyTaskComplete but app 
is nil",
                        zap.String("taskID", taskID))
-               ev := NewSimpleTaskEvent(appID, taskID, CompleteTask)
-               dispatcher.Dispatch(ev)
-               if app.GetApplicationState() == ApplicationStates().Resuming {
-                       dispatcher.Dispatch(NewSimpleApplicationEvent(appID, 
AppTaskCompleted))
-               }
+               return
+       }
+       log.Log(log.ShimContext).Debug("notifyTaskComplete and release 
allocation",

Review Comment:
   Got it. It is fine to keep current message :)



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