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 2022/12/14 10:32:18 UTC

[GitHub] [yunikorn-core] pbacsko opened a new pull request, #478: [YUNIKORN-1465] Track dynamic preemption priority of applications

pbacsko opened a new pull request, #478:
URL: https://github.com/apache/yunikorn-core/pull/478

   ### What is this PR for?
   We want to track the lowest priority allocation (running pod) so that we can always return this value without unecessary calculations.
   
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [x] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [ ] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/YUNIKORN-1465
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


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


[GitHub] [yunikorn-core] craigcondit closed pull request #478: [YUNIKORN-1465] Track dynamic preemption priority of applications

Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #478: [YUNIKORN-1465] Track dynamic preemption priority of applications
URL: https://github.com/apache/yunikorn-core/pull/478


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


[GitHub] [yunikorn-core] craigcondit commented on a diff in pull request #478: [YUNIKORN-1465] Track dynamic preemption priority of applications

Posted by GitBox <gi...@apache.org>.
craigcondit commented on code in PR #478:
URL: https://github.com/apache/yunikorn-core/pull/478#discussion_r1048575678


##########
pkg/scheduler/objects/application.go:
##########
@@ -1508,6 +1510,9 @@ func (sa *Application) addAllocationInternal(info *Allocation) {
 		sa.allocatedResource = resources.Add(sa.allocatedResource, info.GetAllocatedResource())
 		sa.maxAllocatedResource = resources.ComponentWiseMax(sa.allocatedResource, sa.maxAllocatedResource)
 	}
+	if info.GetPriority() < sa.allocMinPriority {

Review Comment:
   add a variable here so we don't call GetPriority() multiple times (this locks the object repeatedly)



##########
pkg/scheduler/objects/application.go:
##########
@@ -1640,9 +1645,32 @@ func (sa *Application) removeAllocationInternal(uuid string, releaseType si.Term
 		}
 	}
 	delete(sa.allocations, uuid)
+	if alloc.GetPriority() == sa.allocMinPriority {
+		sa.updateAllocationMinPriority(alloc.GetPriority())
+	}
 	return alloc
 }
 
+func (sa *Application) updateAllocationMinPriority(allocPriority int32) {

Review Comment:
   This can just be a simple loop, tracking the lowest priority value we find. The extra minPriorityCount stuff doesn't save any time and adds complexity.



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


[GitHub] [yunikorn-core] codecov[bot] commented on pull request #478: [YUNIKORN-1465] Track dynamic preemption priority of applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #478:
URL: https://github.com/apache/yunikorn-core/pull/478#issuecomment-1350846148

   # [Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/478?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#478](https://codecov.io/gh/apache/yunikorn-core/pull/478?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2d197c2) into [master](https://codecov.io/gh/apache/yunikorn-core/commit/24fceecbee525dbb58479587346f23e9c676e0e4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (24fceec) will **increase** coverage by `0.07%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #478      +/-   ##
   ==========================================
   + Coverage   72.52%   72.59%   +0.07%     
   ==========================================
     Files          67       67              
     Lines       10114    10141      +27     
   ==========================================
   + Hits         7335     7362      +27     
     Misses       2533     2533              
     Partials      246      246              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/yunikorn-core/pull/478?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/yunikorn-core/pull/478/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.01% <100.00%> (+0.89%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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


[GitHub] [yunikorn-core] craigcondit commented on a diff in pull request #478: [YUNIKORN-1465] Track dynamic preemption priority of applications

Posted by GitBox <gi...@apache.org>.
craigcondit commented on code in PR #478:
URL: https://github.com/apache/yunikorn-core/pull/478#discussion_r1048575678


##########
pkg/scheduler/objects/application.go:
##########
@@ -1508,6 +1510,9 @@ func (sa *Application) addAllocationInternal(info *Allocation) {
 		sa.allocatedResource = resources.Add(sa.allocatedResource, info.GetAllocatedResource())
 		sa.maxAllocatedResource = resources.ComponentWiseMax(sa.allocatedResource, sa.maxAllocatedResource)
 	}
+	if info.GetPriority() < sa.allocMinPriority {

Review Comment:
   add a variable here so we don't call GetPriority() multiple times.



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