You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Yu-Lin Chen (Jira)" <ji...@apache.org> on 2024/04/21 06:32:00 UTC
[jira] [Resolved] (YUNIKORN-2551) Move `buildRules` out of `AppPlacementManager` to be a function
[ https://issues.apache.org/jira/browse/YUNIKORN-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yu-Lin Chen resolved YUNIKORN-2551.
-----------------------------------
Fix Version/s: 1.6.0
Resolution: Fixed
Merge to master. Thanks for [~arhtur007]'s contribution.
> Move `buildRules` out of `AppPlacementManager` to be a function
> ---------------------------------------------------------------
>
> Key: YUNIKORN-2551
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2551
> Project: Apache YuniKorn
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Arthur Wang
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/placement/placement.go#L70
> {code:java}
> func (m *AppPlacementManager) initialise(rules []configs.PlacementRule) error {
> log.Log(log.Config).Info("Building new rule list for placement manager")
> // build temp list from new config
> // here!!!
> tempRules, err := m.buildRules(rules)
> if err != nil {
> return err
> }
> m.Lock()
> defer m.Unlock()
> {code}
> We call `m.buildRules` without holding AppPlacementManager lock since `buildRules` does not touch any fields of `AppPlacementManager`. It seems to me we should make `buildRules` be a function rather than method of `AppPlacementManager`.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org