You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/03/16 16:59:39 UTC

[GitHub] [incubator-yunikorn-k8shim] pbacsko commented on a change in pull request #382: [YUNIKORN-1108] Follow-up: Fix race conditions in dispatcher_test.go

pbacsko commented on a change in pull request #382:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/382#discussion_r828225701



##########
File path: pkg/dispatcher/dispatcher.go
##########
@@ -181,6 +181,12 @@ func (p *Dispatcher) drain() {
 
 func Start() {
 	log.Logger().Info("starting the dispatcher")
+	if getDispatcher().isRunning() {
+		log.Logger().Info("dispatcher is already running")
+		return
+	}
+	getDispatcher().stopChan = make(chan struct{})
+	getDispatcher().asyncStop = make(chan struct{})

Review comment:
       Re-initialization is necessary due to already existing unit tests.




-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org