yangwwei commented on a change in pull request #216:
URL: 
https://github.com/apache/incubator-yunikorn-core/pull/216#discussion_r563835564



##########
File path: pkg/scheduler/partition.go
##########
@@ -262,6 +262,8 @@ func (pc *PartitionContext) isStopped() bool {
 // Handle the state event for the partition.
 // The state machine handles the locking.
 func (pc *PartitionContext) handlePartitionEvent(event objects.ObjectEvent) 
error {
+       pc.Lock()
+       defer pc.Unlock()

Review comment:
       Can we move this to line 269?
   I think we do not need to lock the partition when calling 
`pc.stateMachine.Event(event.String(), pc.Name)`




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


Reply via email to