wilfred-s commented on a change in pull request #261:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/261#discussion_r601925522
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -1308,14 +1334,3 @@ func (sa *Application)
notifyRMAllocationAskReleased(rmID string, released []*Al
}
sa.rmEventHandler.HandleEvent(releaseEvent)
}
-
-// Auto progress the application when it enters the Failing state if there is
nothing to clean up.
-// Since this is called by the _locked_ state machine while processing an
event we cannot call back
-// into the statemachine directly and we need a go routine to avoid a deadlock.
-func (sa *Application) failAppIfPossible() {
- if resources.IsZero(sa.pending) &&
resources.IsZero(sa.allocatedResource) &&
resources.IsZero(sa.allocatedPlaceholder) {
- // The event handling cannot fail
- //nolint: errcheck
- go sa.HandleApplicationEvent(FailApplication)
- }
-}
Review comment:
Not for the core side. However that event might trigger a state change
which might trigger updates to be send out to the shim.
About 15 line later we call back into the context and remove the partition
from the context. You cannot access it anymore. I think there needs to be a
broader discussion about historic information tracking in the objects. The core
does not do any of that at the moment which we really need to revisit. At that
point it will become important **but** that is a larger change that needs to be
implemented.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]