craigcondit commented on code in PR #773:
URL: https://github.com/apache/yunikorn-core/pull/773#discussion_r1454113466


##########
pkg/scheduler/objects/application.go:
##########
@@ -973,6 +973,10 @@ func (sa *Application) tryAllocate(headRoom 
*resources.Resource, allowPreemption
                        // the iterator might not have the node we need as it 
could be reserved, or we have not added it yet
                        node := getNodeFn(requiredNode)
                        if node == nil {
+                               if rateLimitedLog == nil {

Review Comment:
   Instead of checking for null each time, write an accessor function for the 
log that uses sync.Once() to initialize it, and returns the initialized log.



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

Reply via email to