[ https://issues.apache.org/jira/browse/YUNIKORN-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17822186#comment-17822186 ]
Craig Condit commented on YUNIKORN-2423: ---------------------------------------- I think it would be best to ignore headroom / capacity on resizes. As you say, we need to process those updates no matter what – they are a reflection of the current state of the world, not what we'd like it to be. I also don't think we should involve preemption (at this stage at least). We can decide how to address "over quota" issues from within the scheduling cycle. That may involve preemption depending on policy, or it may not. It might not even be the increased pod that is the one that should be killed. For example, if you have a critical database pod that is under load and we resize up to allow serving a larger number of queries, it would be very bad to choose the db server as the victim just because it happened to be the pod that triggered the "over quota" handling. > Remove unnecessary boolean return value from the tracking code > -------------------------------------------------------------- > > Key: YUNIKORN-2423 > URL: https://issues.apache.org/jira/browse/YUNIKORN-2423 > Project: Apache YuniKorn > Issue Type: Sub-task > Components: core - scheduler > Reporter: Peter Bacsko > Assignee: Peter Bacsko > Priority: Minor > Labels: pull-request-available > > QueueTracker has two methods which both have an unnecessary return value: > > {noformat} > increaseTrackedResource() bool > decreaseTrackedResource() (bool, bool) > {noformat} > The value from {{increaseTrackedResource()}} is always true. It used to be > different, but it no longer has any relevance. > Same goes for {{{}decreaseTrackedResource(){}}}, only the first boolean can > change which indicates whether a tracker can be removed. > Also, {{UserTracker.increaseTrackedResource()}} can be simplified as the > increment always succeeds and does not need to return anything: > {noformat} > func (ut *UserTracker) increaseTrackedResource(queuePath string, > applicationID string, usage *resources.Resource) bool { > ut.Lock() > defer ut.Unlock() > hierarchy := strings.Split(queuePath, configs.DOT) > ut.events.sendIncResourceUsageForUser(ut.userName, queuePath, usage) > increased := ut.queueTracker.increaseTrackedResource(hierarchy, > applicationID, user, usage) > if increased { > ... // branch always taken > } > return increased > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org For additional commands, e-mail: issues-h...@yunikorn.apache.org