Skip to content

Commit

Permalink
[YUNIKORN-3004] Lock User Trackers and Group Trackers map during dele…
Browse files Browse the repository at this point in the history
…te operations (apache#1007)

Closes: apache#1007

Signed-off-by: Manikandan R <manirajv06@gmail.com>
(cherry picked from commit 2113cd7)
  • Loading branch information
manirajv06 authored and rhh777 committed Dec 25, 2024
1 parent 092ab9a commit 57fe8fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/scheduler/ugm/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ func (m *Manager) DecreaseTrackedResource(queuePath, applicationID string, usage
if userTracker.decreaseTrackedResource(queuePath, applicationID, usage, removeApp) {
log.Log(log.SchedUGM).Info("Removing user from manager",
zap.String("user", user.User))
m.Lock()
delete(m.userTrackers, user.User)
m.Unlock()
}
// if the app did not have a group we're done otherwise update the groupTracker
if appGroup == common.Empty {
Expand All @@ -184,7 +186,9 @@ func (m *Manager) DecreaseTrackedResource(queuePath, applicationID string, usage
zap.String("queue path", queuePath),
zap.String("application", applicationID),
zap.Bool("removeApp", removeApp))
m.Lock()
delete(m.groupTrackers, appGroup)
m.Unlock()
}
}

Expand Down

0 comments on commit 57fe8fb

Please sign in to comment.