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 2021/09/14 03:15:56 UTC

[GitHub] [incubator-yunikorn-k8shim] HuangTing-Yao commented on a change in pull request #302: [YUNIKORN-841]Data race in TestResumingStateTransitions()

HuangTing-Yao commented on a change in pull request #302:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/302#discussion_r707876070



##########
File path: pkg/cache/placeholder_manager.go
##########
@@ -61,6 +61,11 @@ func NewPlaceholderManager(clients *client.Clients) *PlaceholderManager {
 }
 
 func getPlaceholderManager() *PlaceholderManager {
+	placeholderMgr.RLock()
+	defer placeholderMgr.RUnlock()
+	if placeholderMgr == nil {
+		return nil

Review comment:
       but it will cause other data race, when we check the nil, need to read the placeholderMgr.




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