craigcondit commented on code in PR #839:
URL: https://github.com/apache/yunikorn-core/pull/839#discussion_r1559870546
##########
pkg/scheduler/objects/queue.go:
##########
@@ -957,27 +957,31 @@ func (sq *Queue) addChildQueue(child *Queue) error {
// This can be executed multiple times and is only effective the first time.
// This is a noop on an unmanaged queue.
func (sq *Queue) MarkQueueForRemoval() {
- // need to lock for write as we don't want to add a queue while marking
for removal
- sq.Lock()
- defer sq.Unlock()
+ children := sq.GetCopyOfChildren()
Review Comment:
This is probably best done after the sq.IsManaged() check, otherwise it's
just useless work. In fact, might be better to just start this function with:
```
if !sq.IsManaged() {
return
}
```
--
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]