manirajv06 commented on code in PR #758:
URL: https://github.com/apache/yunikorn-core/pull/758#discussion_r1441386872
##########
pkg/scheduler/ugm/manager.go:
##########
@@ -401,6 +390,27 @@ func (m *Manager) clearEarlierSetLimits(newUserLimits
map[string]map[string]*Lim
m.clearEarlierSetUserLimits(newUserLimits)
}
+// clearEarlierSetUserWildCardLimits Traverse new wild card user config and
decide whether earlier usage needs to be cleared or not
+// by comparing with the existing config. If config set earlier not now, then
traverse all users, check whether wild card limit has been applied/used or not.
+// Reset earlier settings for the users only when wild card user limit has
been applied.
+func (m *Manager) clearEarlierSetUserWildCardLimits(newUserWildCardLimits
map[string]*LimitConfig) {
+ for queuePath := range m.userWildCardLimitsConfig {
+ hierarchy := strings.Split(queuePath, configs.DOT)
+ // Is queue path exists?
+ if _, ok := newUserWildCardLimits[queuePath]; !ok {
+ for u, ut := range m.userTrackers {
+ // Has wild card user limit applied for this
user?
+ if m.HasWildCardApplied(u, hierarchy) {
Review Comment:
Taken care
--
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]