This is an automated email from the ASF dual-hosted git repository.
ccondit pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/branch-1.6 by this push:
new e69b21c6 [YUNIKORN-3004] Lock User Trackers and Group Trackers map
during delete operations (#1007)
e69b21c6 is described below
commit e69b21c6d6c5f4b18591be33bf5c8dd0c40c4dda
Author: Manikandan R <[email protected]>
AuthorDate: Sat Dec 21 14:19:40 2024 +0530
[YUNIKORN-3004] Lock User Trackers and Group Trackers map during delete
operations (#1007)
Closes: #1007
Signed-off-by: Manikandan R <[email protected]>
(cherry picked from commit 2113cd7e439c840330db313901d8f7855ab3b532)
---
pkg/scheduler/ugm/manager.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pkg/scheduler/ugm/manager.go b/pkg/scheduler/ugm/manager.go
index 517751a1..76a6e12a 100644
--- a/pkg/scheduler/ugm/manager.go
+++ b/pkg/scheduler/ugm/manager.go
@@ -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 {
@@ -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()
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]