wilfred-s commented on code in PR #750:
URL: https://github.com/apache/yunikorn-core/pull/750#discussion_r1430932052
##########
pkg/scheduler/partition.go:
##########
@@ -425,6 +425,10 @@ func (pc *PartitionContext) removeAppInternal(appID
string) *objects.Application
return app
}
+func (pc *PartitionContext) GetApplication(appID string) *objects.Application {
Review Comment:
It might be a package internal method until this point. Lots of places
calling it but they are all in the package. The partition is the place where
the events from the shim get processed **and** the scheduling cycle runs from.
That means we have multiple go routines that could be changing values stored in
the partition. The locking makes sure we have no data races and a consistent
view.
The internal method was locked for that reason and needs to stay like that.
--
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]