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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]