Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
Description
The refactored code in YUNIKORN-2542 contains an unnecessary warning message:
appGroup := userTracker.getGroupForApp(applicationID) log.Log(log.SchedUGM).Debug("Increasing resource usage for user", zap.String("user", user.User), zap.String("queue path", queuePath), zap.String("application", applicationID), zap.String("group", appGroup), zap.Stringer("resource", usage)) groupTracker := m.GetGroupTracker(appGroup) if groupTracker == nil { log.Log(log.SchedUGM).Error("group tracker should be available in groupTrackers map", zap.String("application", applicationID), zap.String("group", appGroup)) return } ...
We don't always have a groupTracker. The previous code simply called increaseTrackedResource() on an empty tracker:
func (ut *UserTracker) increaseTrackedResource(queuePath string, applicationID string, usage *resources.Resource) { ut.Lock() defer ut.Unlock() ut.events.sendIncResourceUsageForUser(ut.userName, queuePath, usage) hierarchy := strings.Split(queuePath, configs.DOT) ut.queueTracker.increaseTrackedResource(hierarchy, applicationID, user, usage) gt := ut.appGroupTrackers[applicationID] log.Log(log.SchedUGM).Debug("Increasing resource usage for group", zap.String("group", gt.getName()), zap.Strings("queue path", hierarchy), zap.String("application", applicationID), zap.Stringer("resource", usage)) gt.increaseTrackedResource(queuePath, applicationID, usage, ut.userName) <- can be null }
Attachments
Issue Links
- is caused by
-
YUNIKORN-2542 Consistent logging and tracker handling for increment/decrement
- Resolved
- links to