wilfred-s commented on a change in pull request #261:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/261#discussion_r599238713
##########
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:
When the partition is removed there is no way to get to the applications
any more. Everything is gone nothing is kept. It does not matter what happens
in the core as long as everything that needs to be released is communicated to
the shim.
If we want to keep history around for a removed shim than this might become
important but at the moment _everything_ is deleted from memory when the
partition is removed.
##########
File path: pkg/scheduler/objects/application_state.go
##########
@@ -99,7 +99,7 @@ func NewAppState() *fsm.FSM {
Dst: Completed.String(),
}, {
Name: FailApplication.String(),
- Src: []string{Accepted.String(), New.String(),
Running.String(), Starting.String(), Completing.String()},
+ Src: []string{New.String(), Accepted.String(),
Starting.String(), Running.String()},
Review comment:
See my comments above.
--
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]